Propogate per-display IME status to SysUI
CL [1] introduced SystemUI to support updating IME window status per display. (i.e. IStatusBarService#setImeWindowStatus left TODO item to add displayId parameter to select the target display.) For IMMS, we applied this API base on current token's displayId, and refined the code flow in Sysui to reset IME window state for non-target display's NavBar when single IME switch to another display case. And make sure some cases in IMMS should reset IME window status: - When current method unbind. - When current top window focus display is not same as current token's display. (That means the input session may connected but IME window not yet attached. Note that it doesn't include external display without system decoration and show IME window on default display case since it is intentional behavior and we still need to update status for this case.) Also added testSetImeWindowStatusWhenImeSwitchOnDisplay in NavigationBarFragmentTest to enhance the ability of verifying external navigation bar. [1]: 24e7a9fd Bug: 127309955 Bug: 117478341 Test: atest NavigationBarFragmentTest Test: manual as below steps: - Pre-condition: 1. Enable desktop mode. 2. Create simulated display. - Use case 1): 1. Launch an activity with input field on simulated display. 2. Bring up the IME there, expect back key icon on external NavBar will changed when IME bring up. 3. Tap on primary display or launch an activity there. (or pressing home key) 4. Expect IME will hide & back key icon on external NavBar will set back. - Use case 2): 1. Launch activity with input field on default display. 2. Tapping EditText in activity on default display. 3. Expect IME will bring up here and back key icon on default display will changed when IME bring up. 4. Launch activity without input field in external display. (i.e. clock app) 5. Expect Both Default & external display's nav bar back key icon will set back. Change-Id: Ia414b8aea631e295cccd6f6da44d04bad16545c7
Loading
Please register or sign in to comment