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

Commit 58f2b172 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Intercept workspace touch when Launcher is in AllApps bottom sheet"...

Merge "Intercept workspace touch when Launcher is in AllApps bottom sheet" into tm-dev am: e8d2c47f

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17048643

Change-Id: Ief2d7cec6c79021d72ab4f033d274160f07d0d22
parents de437141 e8d2c47f
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -121,6 +121,9 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe
            mLongPressState = STATE_COMPLETED;
        }

        boolean isInAllAppsBottomSheet = mLauncher.isInState(ALL_APPS)
                && mLauncher.getDeviceProfile().isTablet;

        final boolean result;
        if (mLongPressState == STATE_COMPLETED) {
            // We have handled the touch, so workspace does not need to know anything anymore.
@@ -136,8 +139,9 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe

            result = true;
        } else {
            // We don't want to handle touch, let workspace handle it as usual.
            result = false;
            // We don't want to handle touch unless we're in AllApps bottom sheet, let workspace
            // handle it as usual.
            result = isInAllAppsBottomSheet;
        }

        if (action == ACTION_UP || action == ACTION_POINTER_UP) {
@@ -153,9 +157,7 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe
        if (action == ACTION_UP || action == ACTION_CANCEL) {
            cancelLongPress();
        }
        if (action == ACTION_UP
                && mLauncher.isInState(ALL_APPS)
                && mLauncher.getDeviceProfile().isTablet) {
        if (action == ACTION_UP && isInAllAppsBottomSheet) {
            mLauncher.getStateManager().goToState(NORMAL);
            mLauncher.getStatsLogManager().logger()
                    .withSrcState(ALL_APPS.statsLogOrdinal)