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

Commit ab0372e7 authored by Jon Miranda's avatar Jon Miranda
Browse files

Clear overlay when swiping up to unstash taskbar.

Once taskbar is unstashed, the user cannot return back to the overlay. We can
clear it here to set the expected state once the user goes home.

Fixes: 359096594
Test: open -1, launch app, go home
Flag: EXEMPT bugfix
Change-Id: I8059c2c45f10d15701ff2961480aef002d273a06
parent c2c79131
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -481,4 +481,13 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
    protected String getTaskbarUIControllerName() {
        return "LauncherTaskbarUIController";
    }

    @Override
    public void onSwipeToUnstashTaskbar() {
        // Once taskbar is unstashed, the user cannot return back to the overlay. We can
        // clear it here to set the expected state once the user goes home.
        if (mLauncher.getWorkspace().isOverlayShown()) {
            mLauncher.getWorkspace().onOverlayScrollChanged(0);
        }
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -1559,6 +1559,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
     * @param delayTaskbarBackground whether we will delay the taskbar background animation
     */
    public void onSwipeToUnstashTaskbar(boolean delayTaskbarBackground) {
        mControllers.uiController.onSwipeToUnstashTaskbar();

        boolean wasStashed = mControllers.taskbarStashController.isStashed();
        mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(/* stash= */ false,
                SHOULD_BUBBLES_FOLLOW_DEFAULT_VALUE, delayTaskbarBackground);
+6 −0
Original line number Diff line number Diff line
@@ -436,4 +436,10 @@ public class TaskbarUIController {
    /** Un-stash the hotseat instantly */
    public void unStashHotseatInstantly() {
    }

    /**
     * Called when we want to unstash taskbar when user performs swipes up gesture.
     */
    public void onSwipeToUnstashTaskbar() {
    }
}