Merge "Fix testAllAppsFromHome failure" into udc-qpr-dev am: d7496cb52b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24057625 Change-Id: Ia16e5882711dfcee152a05dd4f9db4ca65440385 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -223,6 +223,10 @@ public final class LauncherInstrumentation {
|
||||
return getTouchEventPattern("Touch event", action);
|
||||
}
|
||||
|
||||
private static Pattern getTouchEventPattern(String action, int pointerCount) {
|
||||
return getTouchEventPattern("Touch event", action, pointerCount);
|
||||
}
|
||||
|
||||
private static Pattern getTouchEventPatternTIS(String action) {
|
||||
return getTouchEventPattern("TouchInteractionService.onInputEvent", action);
|
||||
}
|
||||
@@ -1803,11 +1807,25 @@ public final class LauncherInstrumentation {
|
||||
break;
|
||||
case MotionEvent.ACTION_POINTER_DOWN:
|
||||
mPointerCount++;
|
||||
if (gestureScope != GestureScope.OUTSIDE_WITH_PILFER
|
||||
&& gestureScope != GestureScope.OUTSIDE_WITHOUT_PILFER
|
||||
&& gestureScope != GestureScope.OUTSIDE_WITH_KEYCODE
|
||||
&& (!isTrackpadGesture || isTwoFingerTrackpadGesture)) {
|
||||
expectEvent(TestProtocol.SEQUENCE_MAIN,
|
||||
getTouchEventPattern("ACTION_POINTER_DOWN", mPointerCount));
|
||||
}
|
||||
expectEvent(TestProtocol.SEQUENCE_TIS, getTouchEventPatternTIS(
|
||||
"ACTION_POINTER_DOWN", mPointerCount));
|
||||
pointerCount = mPointerCount;
|
||||
break;
|
||||
case MotionEvent.ACTION_POINTER_UP:
|
||||
if (gestureScope != GestureScope.OUTSIDE_WITH_PILFER
|
||||
&& gestureScope != GestureScope.OUTSIDE_WITHOUT_PILFER
|
||||
&& gestureScope != GestureScope.OUTSIDE_WITH_KEYCODE
|
||||
&& (!isTrackpadGesture || isTwoFingerTrackpadGesture)) {
|
||||
expectEvent(TestProtocol.SEQUENCE_MAIN,
|
||||
getTouchEventPattern("ACTION_POINTER_UP", mPointerCount));
|
||||
}
|
||||
// When the gesture is handled outside, it's cancelled within launcher.
|
||||
if (gestureScope != GestureScope.INSIDE_TO_OUTSIDE_WITH_KEYCODE
|
||||
&& gestureScope != GestureScope.OUTSIDE_WITH_KEYCODE) {
|
||||
|
||||
Reference in New Issue
Block a user