Skip to content

Commit

Permalink
fixed crash abstract method class on A10
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSluffy committed Feb 6, 2025
1 parent 5889d98 commit 7bbd290
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions quickstep/src/com/android/quickstep/util/GestureExclusionManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,30 @@ class GestureExclusionManager(private val windowManager: IWindowManager) {

@VisibleForTesting
val exclusionListener = object : ISystemGestureExclusionListener.Stub() {
@BinderThread
override fun onSystemGestureExclusionChanged(
displayId: Int,
exclusionRegion: Region?,
unrestrictedOrNull: Region?
) {
if (displayId != DEFAULT_DISPLAY) {
return
}
Executors.MAIN_EXECUTOR.execute {
lastExclusionRegion = exclusionRegion
lastUnrestrictedOrNull = unrestrictedOrNull
listeners.forEach {
it.onGestureExclusionChanged(exclusionRegion, unrestrictedOrNull)
}
@BinderThread
override fun onSystemGestureExclusionChanged(
displayId: Int,
exclusionRegion: Region?,
unrestrictedOrNull: Region?
) {
if (displayId != DEFAULT_DISPLAY) {
return
}
Executors.MAIN_EXECUTOR.execute {
lastExclusionRegion = exclusionRegion
lastUnrestrictedOrNull = unrestrictedOrNull
listeners.forEach {
it.onGestureExclusionChanged(exclusionRegion, unrestrictedOrNull)
}
}
}
fun onSystemGestureExclusionChanged(
displayId: Int,
exclusionRegion: Region?
) {
onSystemGestureExclusionChanged(displayId, exclusionRegion, null)
}
}

/** Adds a listener for receiving gesture exclusion regions */
fun addListener(listener: ExclusionListener) {
Expand Down

0 comments on commit 7bbd290

Please sign in to comment.