Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fccfea35 authored by Jona Wagner's avatar Jona Wagner
Browse files

Launcher3: Fix gesture abort freeze when nav hint disabled

When navigation bar hint is disabled, the taskbar root view has
height 0. In postOnRootViewDraw(), the early return for this case
was missing an `else`, making the inner `if` a statement rather
than a Kotlin expression. The `false` return value was discarded,
and the method always fell through to post a frame draw callback
and return `true`.

Since a zero-height view never draws, the callback that sets
STATE_RESUME_LAST_TASK never fired, leaving the recents animation
in progress indefinitely. This caused the current app to stop
accepting input after aborting a swipe-up gesture, and on the
launcher produced a stuck "No recent items" overlay.

Fix by adding the missing `else` so the function correctly returns
`false` when rootView.height == 0, allowing the caller to set
STATE_RESUME_LAST_TASK directly.

Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/9950
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/9955
Change-Id: I2d3316f7aba70ecd60c856fc839830260e2bcffe
parent 788d6c20
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -192,11 +192,12 @@ class TaskbarInteractor(private val taskbarUIController: TaskbarUIController) {
            if (rootView.height == 0) {
                // When view height is 0, we don't have to wait for anything.
                false
            }
            } else {
                executor.execute {
                    ViewUtils.postFrameDrawn(rootView) { callbackExecutor.execute(callback) }
                }
                true
            }
        } else {
            false
        }