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

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

Merge "Waiting for Normal state when swiping from a popup to home" into main

parents ad3915e7 6f16b338
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -1027,11 +1027,11 @@ public final class LauncherInstrumentation {
            return;
        }

        linearGesture(
                displaySize.x / 2, displaySize.y - 1,
                displaySize.x / 2, 0,
                ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME,
                false, GestureScope.EXPECT_PILFER);
        if (isLauncher3()) {
            gestureToDismissPopup(displaySize);
        } else {
            runToState(() -> gestureToDismissPopup(displaySize), NORMAL_STATE_ORDINAL, "swiping");
        }

        try (LauncherInstrumentation.Closable c1 = addContextLayer(
                String.format("Swiped up from floating view %s to home", floatingRes.get()))) {
@@ -1040,6 +1040,14 @@ public final class LauncherInstrumentation {
        }
    }

    private void gestureToDismissPopup(Point displaySize) {
        linearGesture(
                displaySize.x / 2, displaySize.y - 1,
                displaySize.x / 2, 0,
                ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME,
                false, GestureScope.EXPECT_PILFER);
    }

    /**
     * @return the Workspace object.
     * @deprecated use goHome().