Commit Graph

1315 Commits

Author SHA1 Message Date
Felka Chang
09c9c7733b DO NOT MERGE Fix build break of systemui testcase
To fix the conflict of the parameters of HeadsUpAppearanceController

Test: atest SystemUITests
Change-Id: Id2fae4f7589e54a0f316ebd172a4592d7d8a775a
2018-11-15 14:48:14 +08:00
felkachang
0857955332 DO NOT MERGE Fix the icon overlay after density change
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
2018-11-15 03:41:49 +00:00
Lucas Dupin
1d1c867a71 Merge "Hide wallpaper when backdrop arrives" into pi-dev
am: 78c941d063

Change-Id: I82f13ea6a3ecde7f91899f23da45479ece97ac7d
2018-11-13 13:17:34 -08:00
TreeHugger Robot
78c941d063 Merge "Hide wallpaper when backdrop arrives" into pi-dev 2018-11-13 20:54:41 +00:00
Todd Kennedy
166363d897 Revert "Fix the icon overlay after density change"
This reverts commit 252efd708a.

Reason for revert: breaks git_pi-dev-plus-aosp build

Change-Id: Icbccc53a6b860fab17fefcfe54a72b80957482e4
2018-11-09 18:38:17 +00:00
Todd Kennedy
b2f48af230 Revert "resolve merge conflicts of 0cc0d229d0 to pi-dev-plus-aosp"
This reverts commit 6fa357a529.

Reason for revert: breaks git_pi-dev-plus-aosp build

Change-Id: I12697f8c329ab224f83856176ba989c37920774f
2018-11-09 18:38:07 +00:00
Felka Chang
6fa357a529 resolve merge conflicts of 0cc0d229d0 to pi-dev-plus-aosp
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
2018-11-09 17:29:40 +00:00
felkachang
252efd708a Fix the icon overlay after density change
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
2018-11-08 04:19:36 +00:00
Bill Lin
e4df226c6d Merge "Device show "No SIM card" and then showing carrier name during boot" into pi-dev
am: 2f97046a4e

Change-Id: I3f3f5d49b390dd7841ade7e33fd2ddc5e5309aa1
2018-10-24 02:49:00 -07:00
Bill Lin
2f97046a4e Merge "Device show "No SIM card" and then showing carrier name during boot" into pi-dev 2018-10-24 09:35:33 +00:00
Gus Prevas
30afdb38b0 Merge "Checks keyguard earlier when blocking notifications." into pi-dev
am: e7ca4fe6ee

Change-Id: I5f36bac36447c4a7edb6b9df5be86d4caaa5b41b
2018-10-18 07:14:23 -07:00
Bill Lin
6c7ccabd1d Device show "No SIM card" and then showing carrier name during boot
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
2018-10-17 19:29:12 +00:00
Gus Prevas
f4f0b069a3 Checks keyguard earlier when blocking notifications.
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)
2018-10-17 14:22:03 +00:00
Selim Cinek
12340d1d32 Merge "Fix overlap between operator name and heads-up notification" am: a3608c9116
am: 5013f1c08c

Change-Id: I786b5445e080a3fa9ae9ed90d023c5a6c5a812d5
2018-10-15 16:18:20 -07:00
Selim Cinek
5013f1c08c Merge "Fix overlap between operator name and heads-up notification"
am: a3608c9116

Change-Id: If09c46bba04bca2e2cda99173bc53a2d7e8488e7
2018-10-15 15:56:13 -07:00
Tetsutoki Shiozawa
f1e0f7adad Fix overlap between operator name and heads-up notification
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
2018-10-15 20:52:21 +00:00
Alison Cichowlas
b7a11d3748 Add process-lifecycle-owner-initializer to tests.
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)
2018-09-05 13:57:10 -07:00
Jason Monk
2c3a8045cd Convert sysui to bp
Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
Merged-In: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
(cherry picked from commit a2f2d82f26)
(cherry picked from commit 1a8ee9d2f9)
(cherry picked from commit 83ce30d807)
2018-09-05 13:57:10 -07:00
Alison Cichowlas
0757deaad6 Add process-lifecycle-owner-initializer to tests.
Bug: 112587252
Bug: 114073652
Test: This is to fix the tests.
Change-Id: I083db4e2eb4efd8d4a914f33ac259aa317e568de
Merged-In: I083db4e2eb4efd8d4a914f33ac259aa317e568de
(cherry picked from commit 5f5ad2e627)
2018-09-05 19:57:24 +00:00
Alison Cichowlas
61736e5229 Add process-lifecycle-owner-initializer to tests.
Bug: 112587252
Bug: 114073652
Test: This is to fix the tests.
Change-Id: I083db4e2eb4efd8d4a914f33ac259aa317e568de
Merged-In: I083db4e2eb4efd8d4a914f33ac259aa317e568de
(cherry picked from commit 5f5ad2e627)
2018-09-05 19:56:57 +00:00
Jason Monk
83ce30d807 Convert sysui to bp
Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
Merged-In: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
(cherry picked from commit a2f2d82f26)
(cherry picked from commit 1a8ee9d2f9)
2018-09-05 12:50:09 -07:00
Jason Monk
1a8ee9d2f9 Convert sysui to bp
Test: tests gonna test, builds gonna build
Change-Id: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
Merged-In: I7f1ef2e82ce2c74253c57de8d73079dcfe2d2264
(cherry picked from commit a2f2d82f26)
2018-08-31 14:03:42 -07:00
Aurimas Liutikas
b8616dc4d1 Migrated SystemUI & SettingsLib to androidx
Test: make SystemUI SettingsLib
Bug:76692459
Change-Id: I248fdf4042a0a97bc6349091da21c936c2d37c95
Merged-In: I248fdf4042a0a97bc6349091da21c936c2d37c95
(cherry picked from commit fd52c1433c)
(cherry picked from commit d366771e84)
(cherry picked from commit a14377a450)
2018-08-28 14:19:51 -07:00
Aurimas Liutikas
a14377a450 Migrated SystemUI & SettingsLib to androidx
Test: make SystemUI SettingsLib
Bug:76692459
Change-Id: I248fdf4042a0a97bc6349091da21c936c2d37c95
Merged-In: I248fdf4042a0a97bc6349091da21c936c2d37c95
(cherry picked from commit fd52c1433c)
(cherry picked from commit d366771e84)
2018-08-28 11:51:13 -07:00
Aurimas Liutikas
d366771e84 Migrated SystemUI & SettingsLib to androidx
Test: make SystemUI SettingsLib
Bug:76692459
Change-Id: I248fdf4042a0a97bc6349091da21c936c2d37c95
Merged-In: I248fdf4042a0a97bc6349091da21c936c2d37c95
(cherry picked from commit fd52c1433c)
2018-08-27 22:41:10 -07:00
TreeHugger Robot
3d91fa44b7 Merge "Update severe (5%/1 hour) warning to send through battery saver" into pi-dev 2018-08-22 14:52:42 +00:00
Salvador Martinez
c50a9bd24d Update severe (5%/1 hour) warning to send through battery saver
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
2018-08-22 14:00:24 +00:00
Adrian Roos
64c9d90a63 ScreenDecorations: Update corner radius when configuration changes
Bug: 112876936
Test: atest ScreenDecorationsTest
Change-Id: I4359b3da4a47dcf434f018fe3e62e18354d1be47
2018-08-21 16:13:15 -04:00
Adrian Roos
73ab97c449 ScreenDecorations: Fix stuck / delayed rotations
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
2018-08-09 17:55:23 +02:00
Salvador Martinez
926f071688 Only query for estimate on battery level change
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
2018-07-10 16:35:18 -07:00
Lucas Dupin
218a0cb4c2 Hide wallpaper when backdrop arrives
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
2018-07-10 10:39:25 -07:00
Lucas Dupin
f8463ee043 Fade to black without showing system wallpaper
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
2018-06-18 09:24:38 -07:00
Lucas Dupin
b784e6f7bc Merge "Config to enable/disable AOD via overlay" into pi-dev 2018-06-14 01:16:44 +00:00
Lucas Dupin
1e02f340e0 Config to enable/disable AOD via overlay
Bug: 109894567
Test: mp droid; fastboot -w
Change-Id: I3fda0bf486ae0c4b795ce34ba6823d8dc36a3796
2018-06-13 15:36:04 -07:00
Lucas Dupin
f1381bbe13 Avoid showing bouncer when in a launch transition
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
2018-06-12 21:58:23 +00:00
TreeHugger Robot
cc4efe08de Merge "Update scrims when keyguard gets occluded" into pi-dev 2018-06-07 16:50:34 +00:00
Lucas Dupin
63d72170da Update scrims when keyguard gets occluded
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
2018-06-06 11:42:55 -07:00
Dieter Hsu
36e1ebca09 Update notifications on density or font size change for current user
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
2018-06-06 17:57:38 +00:00
TreeHugger Robot
842ec5085b Merge "Blank screen when coming from pulse" into pi-dev 2018-06-04 19:45:18 +00:00
Lucas Dupin
eb840eacf6 Blank screen when coming from pulse
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
2018-06-01 18:32:48 +00:00
Lucas Dupin
71dd484427 Do not request focus during wake and unlock
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
2018-05-29 15:41:03 -07:00
Lucas Dupin
3116918bf0 Merge "Only animate when the slice is actually animating" into pi-dev 2018-05-23 20:15:19 +00:00
TreeHugger Robot
4524e93577 Merge "On orientation change, update rounded corners" into pi-dev 2018-05-23 14:35:29 +00:00
Beverly
e91f0d05da On orientation change, update rounded corners
When rotating landscape/seascape/upsidedown, the 'top' and 'bottom'
corners are in the correct place

Change-Id: I19858ca42939d81911c5f45bd80d163d0c22eee9
Fixes: 79163187
Test: manual, ScreenDecorationsTest
2018-05-23 09:37:09 -04:00
Sanry Huang
89d55288d9 Merge "Fix User unable to view the keyboard input" into pi-dev 2018-05-23 07:39:27 +00:00
sanryhuang
63787860c2 Fix User unable to view the keyboard input
revert extracted mode solution and using commandQueue to implement
setRemoteInputActive

Test: manual test
Test: atest
Change-Id: I82c63843dd38c19c1f88af15abcc137be4f72c83
Fixes:73275201
2018-05-23 07:37:58 +00:00
Lucas Dupin
3978e6e6ee Only animate when the slice is actually animating
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
2018-05-22 19:13:51 -07:00
TreeHugger Robot
fe1b1f19fe Merge "[Notif] Don't show bouncer on dismiss" into pi-dev 2018-05-22 20:36:51 +00:00
Rohan Shah
593e8f18cd [Notif] Don't show bouncer on dismiss
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
2018-05-22 10:37:11 -07:00
TreeHugger Robot
553fc8b8e0 Merge "Bouncer shouldn't be translated when occluded" into pi-dev 2018-05-22 00:59:29 +00:00