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
Also fixes an infinite recursion when invoking
TestableContext.(un)registerComponentCallbacks().
Test: atest WindowInsetsPolicyTest
Bug: 126511573
Change-Id: I5c9f40054493a83746bce6124d72412e8eb8a0d1
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
This just tests the standard progression into deep idle mode. Exit
conditions and light idle flow is not tested yet.
Bug: 116512267
Test: atest com.android.server.DeviceIdleControllerTest
Change-Id: I015c10871cd00d7a6be19c0b13fd4b3926c9fdf0
In the case where an annotation was not used and the TestableLooper
was manually created, then the messages would be executed on the wrong
thread.
Also switch some handlers over to async, might save us a little time.
Test: runtest --path frameworks/base/tests/testables
Bug: 79550837
Change-Id: I70a36449ae08eb5799e2dad41a5d258bb51a3fd3
Fixes a bunch of flakes, where the WindowManagerService instance
was reused between tests, which caused delayed callbacks from a
previous test affecting state of a future test.
Also introduces a DexmakerShareClassLoaderRule to manage
the 'dexmaker.share_classloader' property instead of sprinkling
error prone System.setProperty() invocations all over the tests.
Change-Id: Ic9445d1b2cef594e79365c425632aabced6343a9
Fixes: 76111404
Fixes: 75991352
Fixes: 75991878
Fixes: 75992153
Test: atest services/tests/servicestests DexmakerShareClassLoaderRuleTest packages/SystemUI/tests packages/SystemUI/shared/tests
Add a system such that when a crash happens on the main thread, it is
delayed until the tests complete, then thrown.
Also mark some old flaky tests as not flaky as they should be good
now.
Test: runtest systemui
Change-Id: Ic18a38daf4a93dab63549d834fa00f295644fbf1
Fixes: 62935720, 62251903, 62529569
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
Change-Id: Ie20f91dbdd0ba6b57b5909cbf0152a32754fe02d
Fixes: 62263757
Test: runtest systemui-notification, cts AudioManagerTest,
cts-verifier DND tests, verify bug reports after toggling
access for various types of managed services, verified
default approved services aren't renabled on boot; verified that
they are reenabled after a device reset, verified that
settings are migrated after a restore from OC backup.
Makes it easy to add or change values of resources from tests.
Test: runtest --path frameworks/base/tests/testables/tests
Change-Id: Iaedff3d4ce9eaf9f270e7c62bc8c1634bd3519ec
- 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
Instead of just having random tests fail, fail all the tests with a
slightly more useful message.
Also remove all the code around acquiring and contention, now that
we have a test rule in place for TestableContext, we can just use
that for cleanup and have a simple copy-on-write provider.
Test: runtest -x frameworks/base/tests/testables && runtest systemui
Change-Id: I907da23730a4a96cfa2bb112100a06980f01b078
Fixes: 37302051