From 8e03ce9a9d9db47b813dd901c8f1ae08cf471ab5 Mon Sep 17 00:00:00 2001 From: Prabir Pradhan Date: Fri, 8 Apr 2022 12:58:42 +0000 Subject: [PATCH] Instrumentation: Wait for finish when injecting pointer events The input injection mode for pointer events in sendPointerSync() was accidentally changed to WAIT_FOR_RESULT instead of WAIT_FOR_FINISH in ag/17506923, causing test failures. Change it back to WAIT_FOR_FINISH. Bug: 228203157 Bug: 228201593 Test: atest HoverTest Change-Id: I2d3a77621290509d5be6279ee450e1881bd9d84d --- core/java/android/app/Instrumentation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java index 961135f471439..8984c4292023b 100644 --- a/core/java/android/app/Instrumentation.java +++ b/core/java/android/app/Instrumentation.java @@ -1181,7 +1181,7 @@ public class Instrumentation { // Direct the injected event into windows owned by the instrumentation target. InputManager.getInstance().injectInputEvent( - event, InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_RESULT, Process.myUid()); + event, InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH, Process.myUid()); if (syncAfter) { WindowManagerGlobal.getWindowManagerService()