After showing the heads up for the fullscreen notification, to
change the density by user will have the status bar icons
not show normally. It will the only one icon overlay on the
clock but actually there are more than one icons. And, it can't
back to normal after expandable notification and collapse the
notification panel.
The root cause is that all of instances of PhoneStatusBarView,
Clock, HeadsUpStatusBarView, and HeadsUpAppearanceController are
recreated by FragmentManager after configuration density and
font changing. The new HeadsUpAppearanceController status is
neither consistent with HeadsUpManager's status nor the state of
the previous instances.
The solution is that to apply the onSaveInstanceState and
onRestoreInstanceState in PhoneStatusBarView, Clock, PanelBar, and
HeadsUpStatusBarView. To make sure that the values of the fields
in the new instance, which are set by other source, have the
consistence with the state of the old instances.
HeadsUpAppearanceController's Constructor.
To hook onLayoutChangedListener to sync the status with
HeadsUpManager's status to HeadsUpStatusBarView if there is a
pinnded heads up notification.
In original, PanelBar.mState is the only one state to save. Instead
of only saving one, to save the view tree state in
CollapsedStatusBarFragment.onSaveInstanceState and restore the view
state in CollapsedStatusBarFragment.onViewCreated.
CollapsedStatusBarFragment.mDisabled1 doesn't need to save and
restore because CommandQueue.recomputeDisableFlags will give it
the correct value.
After density changed, RemoteViews will reinflate the instances of
NotificationHeaderView and the wrapper instances of
NoticationContentView will also recreated in
NotificationContentView.setAmbientChild. The recreated instance
should synchronized with the ExpandableNotificationRow intance.
Bug: 80224819
Fixes: 111996469
Fixes: 117818441
Test: atest SystemUITests
Change-Id: I7b92af7c3cf6290ec58ac13bf295f63b0b36332f
Merged-In: Ia3f8a0f138f403c8e0c74c00d56bd93baf604d3a
To add test testHeaderReadFromOldController into
HeadsUpAppearanceControllerTest.java and conflict with
testOperatorNameViewUpdated.
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: If7d7961dbc12346484f3d139bdc808a53abc6c46
After showing the heads up for the fullscreen notification, to
change the density by user will have the status bar icons
not show normally. It will the only one icon overlay on the
clock but actually there are more than one icons. And, it can't
back to normal after expandable notification and collapse the
notification panel.
The root cause is that all of instances of PhoneStatusBarView,
Clock, HeadsUpStatusBarView, and HeadsUpAppearanceController are
recreated by FragmentManager after configuration density and
font changing. The new HeadsUpAppearanceController status is
neither consistent with HeadsUpManager's status nor the state of
the previous instances.
The solution is that to apply the onSaveInstanceState and
onRestoreInstanceState in PhoneStatusBarView, Clock, PanelBar, and
HeadsUpStatusBarView. To make sure that the values of the fields
in the new instance, which are set by other source, have the
consistence with the state of the old instances.
HeadsUpAppearanceController's Constructor.
To hook onLayoutChangedListener to sync the status with
HeadsUpManager's status to HeadsUpStatusBarView if there is a
pinnded heads up notification.
In original, PanelBar.mState is the only one state to save. Instead
of only saving one, to save the view tree state in
CollapsedStatusBarFragment.onSaveInstanceState and restore the view
state in CollapsedStatusBarFragment.onViewCreated.
CollapsedStatusBarFragment.mDisabled1 doesn't need to save and
restore because CommandQueue.recomputeDisableFlags will give it
the correct value.
After density changed, RemoteViews will reinflate the instances of
NotificationHeaderView and the wrapper instances of
NoticationContentView will also recreated in
NotificationContentView.setAmbientChild. The recreated instance
should synchronized with the ExpandableNotificationRow intance.
Bug: 80224819
Fixes: 111996469
Fixes: 117818441
Test: atest SystemUITests
Change-Id: Ia3f8a0f138f403c8e0c74c00d56bd93baf604d3a
Merged-In: Ia3f8a0f138f403c8e0c74c00d56bd93baf604d3a
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: 111732320
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
Merged-In: I4459997420484431751a4c088aa3856724affe6a
This change modifies NotificationInfo to call the provided keyguard
callback when the "Stop notifications" button is tapped, rather than
when trying to save the new importance value after the undo timeout.
Test: updated test cases in NotificationInfoTest.
Bug: 111416533
Change-Id: I89b4715d0d41be4587753f554862e51c4e1d43c3
Merged-In: I89b4715d0d41be4587753f554862e51c4e1d43c3
(cherry picked from commit 533836ac72)
The title of heads-up notification was shown incompletely
becaue it's covered by operator name.
To fix this issue, the operator name should be hidden
when a heads-up notification is shown.
Fixes: b/116533819
Test: atest SystemUITests
Test: manual - enable config_showOperatorNameInStatusBar
and show a heads-up notification
Merged-In: Id3318cd7cb2c9b6950392fadd11d02ab873d84c5
Change-Id: Id3318cd7cb2c9b6950392fadd11d02ab873d84c5
Bug: 112587252
Bug: 114073652
Test: This is to fix the tests.
Change-Id: I083db4e2eb4efd8d4a914f33ac259aa317e568de
Merged-In: I083db4e2eb4efd8d4a914f33ac259aa317e568de
(cherry picked from commit 5f5ad2e627)
(cherry picked from commit 0757deaad6)
Bug: 112587252
Bug: 114073652
Test: This is to fix the tests.
Change-Id: I083db4e2eb4efd8d4a914f33ac259aa317e568de
Merged-In: I083db4e2eb4efd8d4a914f33ac259aa317e568de
(cherry picked from commit 5f5ad2e627)
Bug: 112587252
Bug: 114073652
Test: This is to fix the tests.
Change-Id: I083db4e2eb4efd8d4a914f33ac259aa317e568de
Merged-In: I083db4e2eb4efd8d4a914f33ac259aa317e568de
(cherry picked from commit 5f5ad2e627)
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
Merged-In: I92453b68b6ee8aad8f862147c877f4e789afc55c
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
SysUI is querying for an estimate too much, this change gates
it on being the first estimate or the battery level having
changed so that we don't waste system resources.
Test: atest PowerUITest
Bug: 110259498
Change-Id: I6fb5c08d6388e463d6216de41b3fd49bbc489b81
Some apps may set a backdrop image after the device enters doze,
causing the artwork to be visible in AOD. Let's draw black.
Test: manual
Test: packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Change-Id: Ib13e14f285594349c1df263f713883449884ff00
Fixes: 110959983
When on the lock screen, and going to AOD animated, user would
temporarily see the system wallpaper. That's not what we want,
we want to fade from semi-transparent black to black, on top
of the backdrop - lock screen wallpaper or media art.
Test: press power on the lock screen when playing media
Test: press power on the lock screen after dismissing media
Test: unlock from AOD
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Fixes: 80575770
Change-Id: I6796e844add889ff86be0cd2052db7c5d5073039
The panel will collapse but the bouncer should not become visible,
otherwise the IME might be requested.
Test: go/sysui-bouncer-tests
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
Change-Id: I0405cf1b956aa239b0684ac357a38cf4b2357cb2
Fixes: 109879604
We were assuming that a show_when_locked window would always be on
the lock screen when the device sleeps, but its possible that,
when charging, a window may come visible after the device enters
doze.
Ideally this should be handled in window manager but not feasible
in P.
Change-Id: I8a1b5e638a8e84bbea3a91fc4ac94feb6195390e
Fixes: 80647623
Test: manual with app from play store
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
For created notifications, entry manager is not going to update entries
after changing the font scale and/or display density when shade is
disabled or other reasons.
To reinflate notifications for current user even filtered.
Fixes: 77728867
Test: manually restore backup with lots of apps and change font scale and/or display density
Test: atest SystemUITests:NotificationDataTest
Change-Id: I37fa38e73af1ebb672abd06282d10d7d928cc3a9
We need to fade from black to the app to achieve a nice transition.
Test: visual
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Change-Id: I13edd9c5f7a1bf9378851ac50c513d36ab821c43
Fixes: 87939048
Focus was being required because the expansion of the panel
would trigger onFullyShown. Bouncer shouldn't need any
translation during WAKE_AND_UNLOCK.
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
Test: go/sysui-bouncer-tests
Change-Id: I6d5c17ba89e14384859cf7fc91ca5cc2815dbfd9
Fixes: 80345339
When rotating landscape/seascape/upsidedown, the 'top' and 'bottom'
corners are in the correct place
Change-Id: I19858ca42939d81911c5f45bd80d163d0c22eee9
Fixes: 79163187
Test: manual, ScreenDecorationsTest
revert extracted mode solution and using commandQueue to implement
setRemoteInputActive
Test: manual test
Test: atest
Change-Id: I82c63843dd38c19c1f88af15abcc137be4f72c83
Fixes:73275201
It's not correct to always animate if there is a layout transition.
The transition might not be triggered when the view is invisible
for example. It's necessary to check if we have pending/running
animations.
Change-Id: I75dbc9f8a152a162a3c77c9b316f653e665b8842
Fixes: 79773596
Test: manual
Test: atest packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java
For blocking helper, when user dismisses by interacting with elements
outside the current notification, we should not show the bouncer.
Changed the logic to only show bouncer/use the checksaverunnable when
the user hits 'stop notifications'
Test: Added test cases, ran via atest, verified manually too
Bug: 80132806
Change-Id: Ic204e1794360684cd6359ff93e77e184e39ad57e