summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
author Cosmin Băieș <cosminbaies@google.com> 2025-02-20 06:01:02 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-20 06:01:02 -0800
commit06892efb6c98a7007bb6433b562b3ae9fc0742d2 (patch)
treeb9d0cb0bf58241f0144bd0ea14bf152e3a9c9247 /services
parent02814a060a4693cb991ab37ae397e4d40be1d9b9 (diff)
parentfbcfb86b9af76046781df1d130bcb42d99ec8418 (diff)
Merge "Fix orientation change race conditions in IME test" into main
Diffstat (limited to 'services')
-rw-r--r--services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java
index 7bd836dc243b..856466675a28 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java
@@ -144,10 +144,9 @@ public class InputMethodServiceTest {
if (!mOriginalVerboseImeTrackerLoggingEnabled) {
setVerboseImeTrackerLogging(true);
}
+ mUiDevice.setOrientationNatural();
prepareIme();
prepareActivity();
- mUiDevice.freezeRotation();
- mUiDevice.setOrientationNatural();
// Waits for input binding ready.
eventually(() -> {
mInputMethodService = InputMethodServiceWrapper.getInstance();
@@ -174,6 +173,9 @@ public class InputMethodServiceTest {
@After
public void tearDown() throws Exception {
+ if (!mUiDevice.isNaturalOrientation()) {
+ mUiDevice.setOrientationNatural();
+ }
mUiDevice.unfreezeRotation();
if (!mOriginalVerboseImeTrackerLoggingEnabled) {
setVerboseImeTrackerLogging(false);