Fix orientation change race conditions in IME test
During setup we first launch the activity and then set the orientation to natural. In most cases this is already the current orientation, so nothing changes. However if the previous test changed to a different orientation, this will trigger an activity re-creation. This could be slightly delayed after the setup, so we might have input_focus and temporarily lose it during the test, which will fail any IME requests. This also removes the freezeRotation call, as setting an orientation also freezes the rotation. Additionally adds a check to restore the orientation to natural during teardown. Flag: EXEMPT testfix Bug: 397765263 Test: atest InputMethodServiceTest Change-Id: I383bebd027eca7155c55ca0f450589f0255e589e
Loading
Please register or sign in to comment