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

Commit cbaf0a7f authored by Brian Isganitis's avatar Brian Isganitis Committed by Android (Google) Code Review
Browse files

Merge "Close overlay onTaskStackChanged when All Apps is visible." into main

parents 63525b83 8215d8be
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -70,6 +70,18 @@ public final class TaskbarOverlayController {
            // New front task will be below existing overlay, so move out of the way.
            hideWindow();
        }

        @Override
        public void onTaskStackChanged() {
            // The other callbacks are insufficient for All Apps, because there are many cases where
            // it can relaunch the same task already behind it. However, this callback needs to be a
            // no-op when only EDU is shown, because going between the EDU steps invokes this
            // callback.
            if (mControllers.getSharedState() != null
                    && mControllers.getSharedState().allAppsVisible) {
                hideWindow();
            }
        }
    };

    private DeviceProfile mLauncherDeviceProfile;
@@ -199,9 +211,11 @@ public final class TaskbarOverlayController {

        @Override
        protected void handleClose(boolean animate) {
            if (mIsOpen) {
                mTaskbarContext.getDragLayer().removeView(this);
                Optional.ofNullable(mOverlayContext).ifPresent(c -> closeAllOpenViews(c, animate));
            }
        }

        @Override
        protected boolean isOfType(int type) {