Reverted ag/4731597 since it was causing issue and instead hides the
menu container when none of its children are visible.
Change-Id: Ie48ef32f8a66392796cb0330faed6dff499bc1b1
Fixes: 114099654
Test: tap around the right edge
I don't see a reason why we would constrain mBarState.addListener to
happen only once, because the whole point is that other classes listen
to those changes as well, and will subscribe unless we mock literally
everything.
Change-Id: Id6aed68c48fbc4f94f78fcd38b9fe0ec83d49c7e
Fixes: 115742174
Test: `atest NotificationStackScrollLayoutTest`
SysUI must send protected broadcasts to avoid system impersonation.
Our tests should also allow these types of broadcasts, otherwise
they will be dropped/skipped on -user builds and functionality
will be broken.
This CL also protects the flashlight broadcast.
Fixes: 110825884
Test: atest com.android.systemui.qs.external.TileServicesTest
Change-Id: I5a3dfc569c1695366e5f0e48cda8a7a32e287e7d
Add some unit tests for NotificationGroupManager testing some basic
functionality and also some of the complex heads up logic.
Bug: 79705024
Test: runtest systemui
Change-Id: I73f01827063d2704a4e1b1d18d479d4e9375447e
Rename NotificationLifetimeExtender.setShouldExtendLifetime to
setShouldManageLifetime. This is more clear in what the logic actually
is and reads better.
Test: runtest systemui
Change-Id: Ic5792322ef0a557812d58f07285acee32cce0c1a
Why?
- This optimization has caused many glitches, it easy to break and
we've done so a few times (technical debt.)
- It's unclear if not calling glClear() is still an optimization.
Most graphics cards actually expect a glClear and are optimized
to discard old frame buffers when the method is invoked
Change-Id: If1bb9b8bf4c907ca907dc1205ad05dabfefeba1b
Fixes: 113286511
Test: manual
Test: shalac@ is keeping an eye on the performance dashboard
Skip QS state change animations when the target view is not fully
visible on screen.
Some tiles require extra time before the status is fully changed and
therefore will be animated later.
Change-Id: I08e76e0fdeab2b260cb7a41a117a6ff484ca3329
Fixes: 111680760
Test: visual and runtest systemui
This CL introduces NotificationLifetimeExtender, an interface for the
various notification managers to implement to say that a notification
should stay around even after being removed. This provides greater
consistency/standardization as opposed to having the same
implementation done differently and scattered throughout different
classes.
Also implements small refactors to try to reduce coupling where possible
(in particular reduce references to NotificationEntryManager) and move
logic to more appropriate locations (in particular move a lot of remote
input logic from NotificationEntryManager to
NotificationRemoteInputManager.)
Test: manual (see below); runtest systemui
* heads up + cancel
* guts active + cancel
* ambient pulse + cancel (UI here is janky even on master)
* have a remote input active + cancel
* have remote history, send, see that the notification stays
Change-Id: I24d345a1f2d8751827e367d1432918b3db7fa5f3
(on AndroidTV there is no need for wallpaper and RAM is wasted)
Bug: 74517029
Test: Push a low resolution wallpaper to the device (adb push new_wallpaper /data/system/users/0/wallpaper),
reboot and check the buffer size for com.android.systemui.ImageWallpaper (adb shell dumpsys SurfaceFlinger)
Change-Id: I992175997ed09360e8fc9c2cabf354fb4fabd1f9
Try to move as much logic up over into stack scroller as possible.
Things that can't move, funnel through NotificationPanel to make the
interface between StatusBar and NotificationPanel more explicit.
Test: Existing tests
Change-Id: I5fa36a9d5d0a8c7f76b9d1843c0733a5758b5838
For consistency with the rest of the system since StatusBarWindowManager
isn't neither a system service or part of Window Manager.
Test: sysuitests
Change-Id: I22f9b929cb3e2fb0c68e1960267855f5e56b2a01
mCallbacks in CastControllerImpl is now
thread-locked by a guard of the same name.
The test implemented in CastControllerImplTest fails
in previous builds (bug 79419738) and passes now.
In order to properly test,
CastControllerImpl::fireOnCastDevicesChanged is
now VisibleForTesting.
Change-Id: I4160938b2da1749a4370d902e314deaf445cda1a
Fixes: 79419738
Test: CastControllerImplTest::testConcurrencyOnMCallback
non-automotive build.
Without this, test will fail to find car-related dependencies on non-car build
and throw.
Bug: 80150596
Test: Ran the test on phone (non-automotive) and mojave (automotive). Both passed successfully.
Change-Id: I3d3d2639ebebc0474b28d5c9303b83c95820eac4
Added basic Unit test for CastControllerImp testing adding and removing
callbacks and that the system recognizes that there were changes.
Change-Id: I992935bdc2a822d00ac66700c6a0da133036fcc1
Test: systemui test passes
Refactor HeadsUpManager so that the auto dismissing alert functionality
is separate and reusable for future use with ambient pulses. Add tests
for this new class and also a few for HeadsUpMananger specific logic
First in two-part CL to split ambient pulse logic from heads up logic.
Second CL will add an ambient pulse manager which uses the alert logic
introduced here and involve more of the actual split.
Test: runtest systemui, manual
Change-Id: I08069562e7bea4c8e25674aa35237e1bb8cf4475
Menu Ime for 3 button layout cannot be hit because nearesttouchframe is
trying to hit the framelayout of menu_ime that contains nothing inside.
Making it check for non-focused buttons will allow it to hit the recents
button.
Change-Id: Id464e9931345911ffba374a1349536cbf270abdf
Fixes: 112432937
Test: atest NearestTouchFrameTest
The current ambient display design doesn't make sense when the
display is not 'always on', let's wake-up directly to the lock
screen instead.
Change-Id: I217720dcf01a507f43e9da6e1970b2246fb75211
Test: double tap from AOD or screen off
Test: lift from AOD or screen off
Test: receive pulsing notification, long press
Fixes: 73148491
Fixes: 111881300
Bug: 111414690
Fixes the issue of stuck or delayed decor overlay rotations. The current logic
cannot handle the case where the overlay has not finished rotating when we start
another rotation.
To work around that, we make sure that the rotation finishes fast enough for that
not to happen, by decoupling it from the rest of SystemUI's traversals on a dedicated
thread.
Also fixes an issue in ScreenDecorations where we restarted drawing even though that
was not needed, which further delayed finishing the rotation of the overlay.
Also fixes an issue in ScreenDecorations where a spurious traversal after rotation
started but before SysUI was notified could draw in the wrong orientation. To prevent
that, we validate that our rotation matches the display rotation and restart the draw
otherwise.
In the future, we should investigate whether we can make this more robust by allowing
stacked rotations, or forbidding rotations while the overlay is not done yet. We should
also make the synchronization between WM and SysUI on what rotation is being drawn more
explict and thus more robust.
Change-Id: I5303a6a8e6392d309c0fe672ff6d1386ae18f235
Merged-In: Id8fe1c7f6b38de8cd3ce5f4170ea37adf8cb9f3d
Bug: 111761727
Test: Ensure you have a lot of notifications, and enable cutout emulation, open camera, quickly rotate phone between landscape and portrait repeatedly, ensure there are no artifacts on screen.
Test: atest ScreenDecorationsTest
Fixes the issue of stuck or delayed decor overlay rotations. The current logic
cannot handle the case where the overlay has not finished rotating when we start
another rotation.
To work around that, we make sure that the rotation finishes fast enough for that
not to happen, by decoupling it from the rest of SystemUI's traversals on a dedicated
thread.
Also fixes an issue in ScreenDecorations where we restarted drawing even though that
was not needed, which further delayed finishing the rotation of the overlay.
Also fixes an issue in ScreenDecorations where a spurious traversal after rotation
started but before SysUI was notified could draw in the wrong orientation. To prevent
that, we validate that our rotation matches the display rotation and restart the draw
otherwise.
In the future, we should investigate whether we can make this more robust by allowing
stacked rotations, or forbidding rotations while the overlay is not done yet. We should
also make the synchronization between WM and SysUI on what rotation is being drawn more
explict and thus more robust.
Previously-Merged-As: I5303a6a8e6392d309c0fe672ff6d1386ae18f235
Bug: 111761727
Test: Ensure you have a lot of notifications, and enable cutout emulation, open camera, quickly rotate phone between landscape and portrait repeatedly, ensure there are no artifacts on screen.
Test: atest ScreenDecorationsTest
Change-Id: Id8fe1c7f6b38de8cd3ce5f4170ea37adf8cb9f3d
Use clock plugin interface to replace current TextClock in keyguard
Bug: 111971817
Test: atest SystemUITests
Change-Id: Ib6920844700445d9cd3ffa4159cd7f630eaa853b
Now that battery saver is sticky this notification never shows
and we are getting reports from people that the notification
they were expecting never showed up. It turns out that a lot
of these were due to people not realizing battery saver was on.
To remedy the worst case situation (your phone is about to die
soon but no 15%/3 hour notification came up) we should always
show the severe warning even if battery saver is on. This only
affects the hybrid warning, not the legacy percentage based
version.
Test: unit tests
Bug: 111596093
Change-Id: I92453b68b6ee8aad8f862147c877f4e789afc55c
Keyguard default show NO SIM earlier than Telephony/Subscription callback
Refactor CarrierText & KeyguardUpdateMonitor
- Replace setup flag by resource attr(showMissingSim/showAirplaneMode)
- Remove setDiplayFlags API, and add mTelephonyCapable flag
- Implement MSG_TELEPHONY_CAPABLE in KeyguardUpdateMonitor
- Default do not show AirplaneMode & NO_SIM label unless define in xml
Bug: 109731429
Test: atest SystemUITests
atest frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
Manual:
1) Insert SIM and reboot device, only show "No Service"->"Operator"
2) Remove SIM and reboot device, only show "No SIM"
3) Enable AirplaneMode reboot, only show "Airplane mode"
4) Insert SIM and trigger sysui crash, state same as 1)
5) Remove SIM and trigger sysui crash, state same as 2)
6) Enable APM trigger sysui crash, state same as 3)
7) Enable APM & WFC, turn on wifi in keyguard showing
-> "Airplane mode" -> "" -> "WiFi Calling"
8) Enable APM & WFC, turn off wifi in keyguard showing
-> "Wifi Calling" -> "Airplane mode"
Change-Id: I4459997420484431751a4c088aa3856724affe6a
Fixes the issue of stuck or delayed decor overlay rotations. The current logic
cannot handle the case where the overlay has not finished rotating when we start
another rotation.
To work around that, we make sure that the rotation finishes fast enough for that
not to happen, by decoupling it from the rest of SystemUI's traversals on a dedicated
thread.
Also fixes an issue in ScreenDecorations where we restarted drawing even though that
was not needed, which further delayed finishing the rotation of the overlay.
Also fixes an issue in ScreenDecorations where a spurious traversal after rotation
started but before SysUI was notified could draw in the wrong orientation. To prevent
that, we validate that our rotation matches the display rotation and restart the draw
otherwise.
In the future, we should investigate whether we can make this more robust by allowing
stacked rotations, or forbidding rotations while the overlay is not done yet. We should
also make the synchronization between WM and SysUI on what rotation is being drawn more
explict and thus more robust.
Change-Id: I5303a6a8e6392d309c0fe672ff6d1386ae18f235
Merged-In: I5303a6a8e6392d309c0fe672ff6d1386ae18f235
Bug: 111761727
Test: Ensure you have a lot of notifications, and enable cutout emulation, open camera, quickly rotate phone between landscape and portrait repeatedly, ensure there are no artifacts on screen.
Test: atest ScreenDecorationsTest
Bug: 111077107
Test: Implement listener in Launcher and verify the callbacks are made
Change-Id: I4017c8e139242c2b0875f8222c99396d55b1be04
Signed-off-by: Winson Chung <winsonc@google.com>