Fix rotation test on tablets
Although we set "android:configChanges="orientation|screenSize" for TestActivity, it is still recreated after rotation on tablets. After recreation, the old activity and EditText view are dropped, which causes the test failures. Fix this by: 1. Remove android:configChanges to trigger recreation at all devices 2. Record the last created instance of TestActivity to get the new activity 3. Verify the show/hide behavior for the new acitivity. Note that the keyboard will not show after activity recreation only when visibility flag is SOFT_INPUT_STATE_ALWAYS_HIDDEN. Bug: 275666243 Test: atest com.android.inputmethod.stresstest.ImeOpenCloseStressTest#testRotateScreenWithKeyboardOn Change-Id: I113c0b1376febed5cb6dace9cd0467339f77c699
Loading
Please register or sign in to comment