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

Commit d586d054 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Waiting for Normal state after pressing meta key in AllApps" into main

parents 3e53925c 70232486
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -363,6 +363,7 @@ public abstract class AllApps extends LauncherInstrumentation.VisibleContainer

    /**
     * Taps outside bottom sheet to dismiss it. Available on tablets only.
     *
     * @param tapRight Tap on the right of bottom sheet if true, or left otherwise.
     */
    public void dismissByTappingOutsideForTablet(boolean tapRight) {
@@ -391,7 +392,7 @@ public abstract class AllApps extends LauncherInstrumentation.VisibleContainer
    /** Presses the meta keyboard shortcut to dismiss AllApps. */
    public void dismissByKeyboardShortcut() {
        try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) {
            mLauncher.getDevice().pressKeyCode(KEYCODE_META_RIGHT);
            pressMetaKey();
            try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
                    "pressed meta key")) {
                verifyVisibleContainerOnDismiss();
@@ -399,6 +400,10 @@ public abstract class AllApps extends LauncherInstrumentation.VisibleContainer
        }
    }

    protected void pressMetaKey() {
        mLauncher.getDevice().pressKeyCode(KEYCODE_META_RIGHT);
    }

    /** Presses the esc key to dismiss AllApps. */
    public void dismissByEscKey() {
        try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck()) {
@@ -419,6 +424,7 @@ public abstract class AllApps extends LauncherInstrumentation.VisibleContainer

    /**
     * Return the QSB UI object on the AllApps screen.
     *
     * @return the QSB UI object.
     */
    @NonNull
+9 −1
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@ public class HomeAllApps extends AllApps {

    /**
     * Swipes up or down to dismiss to Workspace.
     * @param swipeDown Swipe all apps down to dismiss, otherwise swipe up to dismiss by going home.
     *
     * @param swipeDown Swipe all apps down to dismiss, otherwise swipe up to dismiss by going home.
     * @return the Workspace object.
     */
    @NonNull
@@ -139,4 +139,12 @@ public class HomeAllApps extends AllApps {
                NORMAL_STATE_ORDINAL,
                "touching outside");
    }

    @Override
    protected void pressMetaKey() {
        mLauncher.runToState(
                () -> super.pressMetaKey(),
                NORMAL_STATE_ORDINAL,
                "pressing meta key");
    }
}