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]: 24e7a9fdb5
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
See go/jetpack-test-android-migration
This is the internal version of AOSP change aosp/908373
Test: m -j TestablesTests NetworkStackTests FrameworksServicesTests SystemUITests FrameworksUiServicesTests ExtServicesUnitTests WmTests FrameworksCoreTests
Exempt-From-Owner-Approval: automated package name refactoring; already reviewed on AOSP
Change-Id: Ib04d80954bd8536914d88c66b28e6632e60a6245
Convert NavigationBarFragment as a proof of concept and remove all
references to Dependency from NavigationBarFragment.
Test: atest SystemUITests
Change-Id: I0cdb5bc6ac455fce91e67b9e449cb7b78b1da9a4
Override dispatchTouchEvent for the root FrameLayout
of NavigationBar to process ACTION_OUTSIDE MotionEvents
and dispatch directly to DeadZone to keep track of the
most recent outside tap.
Clarified documentation of ACTION_OUTSIDE behaviour.
Bug: 37552674
Test: open IME, tap any key, then quickly tap on top half
of the home button. The home button tap is ignored
and device does not go to homescreen.
Change-Id: Icb5cf6c76959f3514b8b94c09e38cc5434f31b23
- Fix testAttachDetach, process more messages so it actually
does attach and detach
- Don't inflate Clocks in QSFragmentTest because they are doing
something weird...
Test: runtest systemui
Change-Id: I05360630ee8d96158b6ab36660f20588ad158a28
Fixes: 37773362