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

Commit 4d4c7e06 authored by Sebastián Franco's avatar Sebastián Franco Committed by Android (Google) Code Review
Browse files

Merge "Send ACTION_UP if there is an exception" into main

parents 4dc58c9d 6be69063
Loading
Loading
Loading
Loading
+17 −11
Original line number Diff line number Diff line
@@ -2055,11 +2055,14 @@ public final class LauncherInstrumentation {
        final long downTime = SystemClock.uptimeMillis();
        sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, targetCenter,
                GestureScope.DONT_EXPECT_PILFER);
        try {
            expectEvent(TestProtocol.SEQUENCE_MAIN, longClickEvent);
            final UiObject2 result = waitForLauncherObject(resName);
            return result;
        } finally {
            sendPointer(downTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, targetCenter,
                    GestureScope.DONT_EXPECT_PILFER);
        return result;
        }
    }

    @NonNull
@@ -2070,12 +2073,15 @@ public final class LauncherInstrumentation {
        sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, targetCenter,
                GestureScope.DONT_EXPECT_PILFER, InputDevice.SOURCE_MOUSE,
                /* isRightClick= */ true);
        try {
            expectEvent(TestProtocol.SEQUENCE_MAIN, rightClickEvent);
            final UiObject2 result = waitForLauncherObject(resName);
            return result;
        } finally {
            sendPointer(downTime, SystemClock.uptimeMillis(), ACTION_UP, targetCenter,
                    GestureScope.DONT_EXPECT_PILFER, InputDevice.SOURCE_MOUSE,
                    /* isRightClick= */ true);
        return result;
        }
    }

    private static int getSystemIntegerRes(Context context, String resName) {
+9 −5
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.launcher3.tapl;

import static com.android.launcher3.tapl.Launchable.DEFAULT_DRAG_STEPS;

import static org.junit.Assert.assertTrue;

import android.graphics.Point;
@@ -61,11 +62,14 @@ public class WidgetResizeFrame {
            final long downTime = SystemClock.uptimeMillis();
            mLauncher.sendPointer(downTime, downTime, MotionEvent.ACTION_DOWN, targetStart,
                    LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
            try {
                mLauncher.movePointer(targetStart, targetDest, DEFAULT_DRAG_STEPS,
                        true, downTime, downTime, true,
                        LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
            } finally {
                mLauncher.sendPointer(downTime, downTime, MotionEvent.ACTION_UP, targetDest,
                        LauncherInstrumentation.GestureScope.DONT_EXPECT_PILFER);
            }

            try (LauncherInstrumentation.Closable c2 = mLauncher.addContextLayer(
                         "want to return resized widget resize frame")) {