From 19a0a4ec915b595d37a03eebe06b609b55eed7e2 Mon Sep 17 00:00:00 2001 From: ot904697 Date: Thu, 28 Jul 2022 14:01:17 +0800 Subject: [PATCH] Activity gain focus failed in InputMethodStressTest After the test is completed, the notification is not closed, so that subsequent test cannot get the focus. Close notification in tearDown to solve the issue. Bug: 241723484 Test: run InputMethodStressTest pass Change-Id: I876173e83488e18a884d8bc180f9681e726fff1d --- .../src/com/android/inputmethod/stresstest/NotificationTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/NotificationTest.java b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/NotificationTest.java index 47f87d6d75fff..573b3b695a906 100644 --- a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/NotificationTest.java +++ b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/NotificationTest.java @@ -102,6 +102,7 @@ public final class NotificationTest { @After public void tearDown() { mNotificationManager.cancelAll(); + mUiDevice.pressHome(); } @Test