Fix InputMethodManagerTest for visible bkg user on secondary display
Tests meant to run for secondary user on the secondary display, like
InputMethodManagerTest, shouldn’t look up InputMethodManager from
Instrumentation#getContext, instead they should retrieve from the test
activity running on the test user's main display (secondary display for visible background user).
Each display has its own focused window, its own input connection,
etc.The IMM works closely with the WindowManager. Each Activity has its
own Window, and these windows are managed by the WindowManager according
to the display they are on. Operations like showing or hiding the
keyboard involve coordinating between the IMM and the WindowManager to
adjust the layout of the Activity's window on its specific display.
Fix: 403622858
Flag: TEST_ONLY
Test: presubmit
Test: atest CtsInputMethodTestCases:InputMethodManagerTest Test: atest --user-type secondary_user CtsInputMethodTestCases:InputMethodManagerTest
Test: atest --user-type secondary_user_on_secondary_display
CtsInputMethodTestCases:InputMethodManagerTest
Test: atest CtsInputMethodTestCases:InputMethodManagerTest
Change-Id: Ie8bd0505f45c05cc931dfdac249485cff12f1dfa
1 file changed