From 623670c2e3d2557b28ef0ee4c69af1abc750e192 Mon Sep 17 00:00:00 2001 From: vadimt Date: Thu, 21 May 2020 12:32:33 -0700 Subject: [PATCH] Checking success of injectInputEvent Bug: 156287114 Change-Id: Id000b39a187c909475dd6dd409d14430b3654517 --- .../com/android/launcher3/tapl/LauncherInstrumentation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 79008a76f3..7c2d8a7168 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -1144,7 +1144,8 @@ public final class LauncherInstrumentation { } final MotionEvent event = getMotionEvent(downTime, currentTime, action, point.x, point.y); - mInstrumentation.getUiAutomation().injectInputEvent(event, true); + assertTrue("injectInputEvent failed", + mInstrumentation.getUiAutomation().injectInputEvent(event, true)); event.recycle(); }