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

Commit 6f16b338 authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Waiting for Normal state when swiping from a popup to home

Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: I3bcb7717e0b8e7b9ac94aac157297c4cf675f72e
parent 8d42081b
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().