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

Commit 0877cdab authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensure widgets header is out of the gesture region before clicking" into sc-dev

parents 26cd946f d410a2c1
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -185,8 +185,12 @@ public final class Widgets extends LauncherInstrumentation.VisibleContainer {
                    targetAppSelector);
                    targetAppSelector);
            if (headerTitle != null) {
            if (headerTitle != null) {
                // If we find the header and it has not been expanded, let's click it to see the
                // If we find the header and it has not been expanded, let's click it to see the
                // widgets list.
                // widgets list. Note that we wait until the header is out of the gesture region at
                if (!hasHeaderExpanded) {
                // the bottom of the screen, because tapping there in Launcher3 causes NexusLauncher
                // to briefly appear to handle the gesture, which can break our test.
                boolean isHeaderOutOfGestureRegion = headerTitle.getVisibleCenter().y
                        < mLauncher.getBottomGestureStartOnScreen();
                if (!hasHeaderExpanded && isHeaderOutOfGestureRegion) {
                    log("Header has not been expanded. Click to expand.");
                    log("Header has not been expanded. Click to expand.");
                    hasHeaderExpanded = true;
                    hasHeaderExpanded = true;
                    mLauncher.clickLauncherObject(headerTitle);
                    mLauncher.clickLauncherObject(headerTitle);