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

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

Merge "Removing verifying motion events in TAPL" into udc-qpr-dev

parents 233ca49f 4d317970
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ package com.android.launcher3.testing;

import static com.android.launcher3.allapps.AllAppsStore.DEFER_UPDATES_TEST;
import static com.android.launcher3.config.FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW;
import static com.android.launcher3.config.FeatureFlags.ENABLE_TRACKPAD_GESTURE;
import static com.android.launcher3.config.FeatureFlags.FOLDABLE_SINGLE_PAGE;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;

@@ -236,12 +235,6 @@ public class TestInformationHandler implements ResourceBasedOverride {
                return response;
            }

            case TestProtocol.REQUEST_IS_TRACKPAD_GESTURE_ENABLED: {
                response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD,
                        ENABLE_TRACKPAD_GESTURE.get());
                return response;
            }

            case TestProtocol.REQUEST_ALL_APPS_TOP_PADDING: {
                return getLauncherUIProperty(Bundle::putInt,
                        l -> l.getAppsView().getActiveRecyclerView().getClipBounds().top);
+4 −7
Original line number Diff line number Diff line
@@ -70,15 +70,12 @@ public final class TestLogging {
    public static void recordMotionEvent(String sequence, String message, MotionEvent event) {
        final int action = event.getAction();
        if (Utilities.isRunningInTestHarness() && action != MotionEvent.ACTION_MOVE) {
            // "Expecting" in TAPL ACTION_DOWN, UP and CANCEL events was thought to be producing
            // considerable noise in tests due to failed checks for expected events. So we are not
            // sending them to TAPL.
            // "Expecting" in TAPL motion events was thought to be producing considerable noise in
            // tests due to failed checks for expected events. So we are not sending them to TAPL.
            // Other events, such as EVENT_PILFER_POINTERS produce less noise and are thought to
            // be more useful.
            final boolean reportToTapl = action != MotionEvent.ACTION_DOWN
                    && action != MotionEvent.ACTION_UP
                    && action != MotionEvent.ACTION_CANCEL;
            recordEventSlow(sequence, message + ": " + event, reportToTapl);
            // That's why we pass false as the value for the 'reportToTapl' parameter.
            recordEventSlow(sequence, message + ": " + event, false);
            registerEventNotFromTest(event);
        }
    }
+0 −1
Original line number Diff line number Diff line
@@ -120,7 +120,6 @@ public final class TestProtocol {
            "get-activities-created-count";
    public static final String REQUEST_GET_ACTIVITIES = "get-activities";
    public static final String REQUEST_HAS_TIS = "has-touch-interaction-service";
    public static final String REQUEST_IS_TRACKPAD_GESTURE_ENABLED = "is-trackpad-gesture-enabled";
    public static final String REQUEST_TASKBAR_ALL_APPS_TOP_PADDING =
            "taskbar-all-apps-top-padding";
    public static final String REQUEST_ALL_APPS_TOP_PADDING = "all-apps-top-padding";
+4 −4
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ public final class SecondaryDisplayLauncherTest extends AbstractLauncherUiTest {
        mStartPoint = icon.getVisibleCenter();
        mEndPoint = new Point(mStartPoint.x, mStartPoint.y);
        mLauncher.sendPointer(mDownTime, mDownTime, ACTION_DOWN, mStartPoint,
                LauncherInstrumentation.GestureScope.INSIDE);
                LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
        assertThat(findObjectByResourceName("popup_container")).isNotNull();
        return appName;
    }
@@ -206,7 +206,7 @@ public final class SecondaryDisplayLauncherTest extends AbstractLauncherUiTest {
        mStartPoint = icon.getVisibleCenter();
        mEndPoint = new Point(mStartPoint.x, mStartPoint.y);
        mLauncher.sendPointer(mDownTime, mDownTime, ACTION_DOWN, mStartPoint,
                LauncherInstrumentation.GestureScope.INSIDE);
                LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
        assertThat(findObjectByResourceName("popup_container")).isNotNull();
        return appName;
    }
@@ -214,12 +214,12 @@ public final class SecondaryDisplayLauncherTest extends AbstractLauncherUiTest {
    private void moveAppToCenterOfScreen() {
        mEndPoint.set(mDevice.getDisplayWidth() / 2, mDevice.getDisplayHeight() / 2);
        mLauncher.movePointer(mDownTime, SystemClock.uptimeMillis(), DRAG_TIME_MS, true,
                mStartPoint, mEndPoint, LauncherInstrumentation.GestureScope.INSIDE);
                mStartPoint, mEndPoint, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
    }

    private void dropApp() {
        mLauncher.sendPointer(mDownTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP,
                mEndPoint, LauncherInstrumentation.GestureScope.INSIDE);
                mEndPoint, LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
    }

    private void removeAppByName(String appName) {
+2 −2
Original line number Diff line number Diff line
@@ -45,8 +45,8 @@ public class AddToHomeScreenPrompt {
            mLauncher.clickObject(
                    mLauncher.waitForObjectInContainer(
                            mWidgetCell.getParent().getParent().getParent().getParent(),
                            By.text(ADD_AUTOMATICALLY)),
                    LauncherInstrumentation.GestureScope.OUTSIDE_WITHOUT_PILFER);
                            By.text(ADD_AUTOMATICALLY))
            );
            mLauncher.waitUntilLauncherObjectGone(getSelector());
        }
    }
Loading