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

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

Merge "Inserting waiting for wallpaper animation into "back" gesture from app...

Merge "Inserting waiting for wallpaper animation into "back" gesture from app to workspace" into main
parents 2be2b932 76dd9d4e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ public class TaplTestsTrackpad extends AbstractQuickStepTest {
            mLauncher.setTrackpadGestureType(TrackpadGestureType.THREE_FINGER);

            startTestActivity(2);
            mLauncher.pressBack();
            mLauncher.getLaunchedAppState().pressBackToWorkspace();
        } finally {
            instrumentation.getUiAutomation().dropShellPermissionIdentity();
        }
+13 −0
Original line number Diff line number Diff line
@@ -340,4 +340,17 @@ public final class LaunchedAppState extends Background {
            }
        }
    }

    /** Send the "back" gesture to go to workspace. */
    public Workspace pressBackToWorkspace() {
        try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck();
             LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
                     "want to press back from launched app to workspace")) {
            mLauncher.executeAndWaitForWallpaperAnimation(
                    () -> mLauncher.pressBackImpl(),
                    "pressing back"
            );
            return new Workspace(mLauncher);
        }
    }
}
+27 −23
Original line number Diff line number Diff line
@@ -1121,6 +1121,11 @@ public final class LauncherInstrumentation {
     */
    public void pressBack() {
        try (Closable e = eventsCheck(); Closable c = addContextLayer("want to press back")) {
            pressBackImpl();
        }
    }

    void pressBackImpl() {
        waitForLauncherInitialized();
        final boolean launcherVisible =
                isTablet() ? isLauncherContainerVisible() : isLauncherVisible();
@@ -1147,7 +1152,6 @@ public final class LauncherInstrumentation {
            }
        }
    }
    }

    private static BySelector getAnyObjectSelector() {
        return By.textStartsWith("");