Commit Graph

2774 Commits

Author SHA1 Message Date
Jeff DeCew
025a668cf9 Merge "Do not show the notification footer until the user is set up." into qt-dev am: 3bc24e3826
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15877960

Change-Id: Id7097c9716292cb6edef1e06fe321b954fcff7ac
2021-10-05 17:32:35 +00:00
Jeff DeCew
e7f992a133 Do not show the notification footer until the user is set up.
Bug: 193149550
Test: follow repro steps
Merged-In: I49e2b8bcec7b2ce0a9776ff30a64c07f24949da7
Change-Id: I49e2b8bcec7b2ce0a9776ff30a64c07f24949da7
2021-09-22 16:04:05 +00:00
Beth Thibodeau
fcd571f060 Increase maximum allowed size for status bar icons am: 92106a58df
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14053514

Change-Id: Ide2c48e4eedeb5d15a6a3199b7ad66cec1320338
2021-04-27 21:20:01 +00:00
Beth Thibodeau
c7731486df Merge "Limit maximum allowed size for a status bar icon" into pi-dev am: ed7118d8bf am: 04043de40c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13430565

Change-Id: I5d7be58c98debc681c655d8cda5745a449b91e58
2021-04-27 21:18:08 +00:00
Beth Thibodeau
92106a58df Increase maximum allowed size for status bar icons
The previous size was causing some apps to crash which otherwise worked
fine. This more closely matches the hard limit in RecordingCanvas
(which we need to stay below to prevent SystemUI from crashing).

Fixes: 182891864
Fixes: 182232777
Bug: 169255797
Test: atest StatusBarIconViewTest
Test: manual - posting notifications with different drawable sizes
Change-Id: I8deacc651e05a202ec980eeb8bcdf4f92daea8eb
(cherry picked from commit 5cd7976f7d)
2021-04-01 18:16:47 +00:00
Beth Thibodeau
04043de40c Merge "Limit maximum allowed size for a status bar icon" into pi-dev am: ed7118d8bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13430565

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4dd07763f8c0c767c82a8e354f20e980e06a9373
2021-03-03 19:32:05 +00:00
Evan Laird
98d6853f1a DO NOT MERGE: Allow interrupting notifications to bypass lifetime extension
Notifications which have interruped the UI (usually a HUN) can safely
bypass FGS lifetime extension because the system has done the best it
can to show the user this notification.

This valve is important in particular for things like a dialer which
might want to interrupt a user but need to do so again on the same
channel, for instance when getting multiple phone calls quickly in
succession.

Bug: 155594347
Bug: 119041698
Test: atest ForegroundServiceNotificationListenerTest
Change-Id: Id80fba3191cc133d1e73ca04015f9cbed62fc086
2021-01-29 10:47:58 -05:00
Evan Laird
cec677aca4 DO NOT MERGE: Create a shim for StatusBarManager click methods
`StatusBarManager#onNotificationClick` and
`StatusBarManager#onNotificationActionClick` are signals we send to
system server about notification clicks. This CL adds a shim so that we
can have an in-process callback about the exact same events.

This CL also adds NotificationInteractionTracker, which basically just
merges the NotificationClickNotifier callbacks with the notification
collection and will be able to answer the question "has the user
interacted with this notification"

Lastly, this modifies the logic in ForegroundServiceLifetimeExtender
which now checks the interaction flag for notifications. So if a user
tapped on a notification action (for instance) which _then_ triggers a
notification cancel, it will succeed. It _does not_ as of yet release
the notification from lifetime extension upon interaction. So if a
notification is canceled and then interacted with, it will still live
the full amount of time.

Test: atest SystemUITests
Bug: 144324894
Bug: 119041698
Change-Id: I42201d6e7b7ffe9ad4f19c774b638a36a51750ef
(cherry picked from commit 9b2a480ceb)
2021-01-29 10:47:13 -05:00
Beth Thibodeau
c508aed10f Limit maximum allowed size for a status bar icon
Bug: 169255797
Test: atest StatusBarIconViewTest
Test: verified that app crashes instead of SysUI following repro steps
Change-Id: I66e3bb873841b5babfd522c82cea7bed361fc14c
(cherry picked from commit 4394595deb)
2021-01-28 22:00:46 +00:00
Dave Mankoff
964b61262c Merge "Allow two finger swipes down." into qt-qpr1-dev 2020-03-18 20:24:54 +00:00
Xiangyu/Malcolm Chen
fab553bc7b Merge "Move filterMobileSubscriptionInSameGroup into KeyguardUpdateMonitor." into qt-qpr1-dev 2020-03-17 19:29:26 +00:00
Malcolm Chen
c5029c9007 Move filterMobileSubscriptionInSameGroup into KeyguardUpdateMonitor.
This avoids race condition that, KeyguardUpdateMonitor refreshes active
sub list however CarrierTextController filtered it based on stale active
data subId.

By move filterMobileSubscriptionInSameGroup into KeyguardUpdateMonitor,
it becomes the single source of truth about which carrier name should be
shown.

Bug: 138456731
Bug: 151600673
Test: manual and unittest
Change-Id: Ida3a90c5408b056cad7a79fbba84fe880ce1e5be
Merged-In: Ida3a90c5408b056cad7a79fbba84fe880ce1e5be
(cherry picked from commit 5c63b51d9e)
2020-03-17 19:29:12 +00:00
Lucas Dupin
2263309459 Either reuse sensor values or don't dim down at all
ALS latency is unpredictable and sometimes debounced. This means that it
might take at least 3 seconds for the display to wake-up, if it wakes-up
at all. We might also get stuck and never show HUNs if the event doesn't
arrive.

This is a bug that we had in the past, but was not as noticeable because
the padlock was below the scrims, now, users are reporting that the
padlock shows up, but the hun is not.

Test: manual
Fixes: 150852696
Change-Id: Iade5ebd4c33e7c9d668b09144964f1408ef529ad
Merged-In: Iade5ebd4c33e7c9d668b09144964f1408ef529ad
2020-03-12 20:01:13 +00:00
Dave Mankoff
70db873eea Allow two finger swipes down.
Bug: 140715042
Test: atest SystemUITests
Change-Id: Iebfec76045897818cec89f588ebd1d72a782c942
2020-03-10 11:39:39 -04:00
Dave Mankoff
be885c832f Remove Dependency.staticOnConfigurationChanged
ConfigurationChangedReceiver is removed. Classes that want to be
notified of configuration changes should implement
ConfigurationController.ConfigurationListener instead and register
themselves with the ConfigurationController.

This CPs http://ag/9762349

Change-Id: I00c08a30b6d8dcac7e26230cb4354bc1fda74b10
Merged-In: Id2c3fe5ae2729b181769fb31b8050da264299d72
Bug: 150541820
Test: atest SystemUITests
2020-03-03 13:22:39 -05:00
Bill Lin
9ae18fa2d9 DO NOT MERGE Respect rounded.xml size in ScreenDecorations
Suppose vendors will customize rounded.xml with corresponding
multiple radius path and size, ScreenDecorations should not resize it
by rounded_corner_radius in case jagged edges problem

Test: atest SystemUITests
Test: atest ScreenDecorationsTest
Bug: 145707162
Bug: 148912090
Change-Id: Ie33526214072ad324ca00a10074ad212dfbf4258
2020-02-21 07:46:18 +00:00
Wilson Wu
94431615b1 Merge "Use the main thread to update alignment indication" into qt-qpr1-dev 2020-02-11 03:54:55 +00:00
TreeHugger Robot
3bc45ce2ab Merge "[DO NOT MERGE] Fix AoD front scrim being opaque at DOZE_PULSING" into qt-qpr1-dev 2020-02-11 03:43:31 +00:00
Wilson Wu
f656f6d2c1 Use the main thread to update alignment indication
The alignment status is reported from WLC-HAL level and runs
on another thread. It may cause CalledFromWrongThreadException,
if use that thread to update UI directly.

Bug: 146770234
Test: atest SystemUITests:KeyguardIndicationControllerTest
Change-Id: I89bf1c188d6ba094106e059f1590c9eaf3703bb8
(cherry picked from commit 0e72713fdf)
Merged-In: I89bf1c188d6ba094106e059f1590c9eaf3703bb8
2020-02-07 05:59:32 +00:00
Chris.CC Lee
4aced5d906 [DO NOT MERGE] Fix AoD front scrim being opaque at DOZE_PULSING
When doze state changed from DOZE to DOZE_PULSING on devices not
supporting doze_brightness_sensor_type sensor, there would be no
sensor events to update the AoD front scrim. And due to the scrim was
set to opaque at DOZE state, most views on the statusbar will be
invisible. This patch change the scrim to transparent again at leaving
DOZE state.

Bug: 148129743
Test: atest DozeScreenBrightnessTest
Change-Id: I1cf9d02c9e35dcb3e94cbbc24fec483c51e372d9
2020-02-04 09:34:48 +08:00
Lucas Dupin
c93fa740aa resolve merge conflicts of 01f94b7cc0 to qt-qpr1-dev
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I2d15aaa7402e4e08f1630aa29892ad6cd68bd2b1
Merged-In: I34d1d5f9a751c1d7680a5a5941c39b9fe33a473b
2020-02-04 01:12:40 +00:00
Lucas Dupin
44d1c652ce Update redaction upon profile changes
We can't rely on status bar state changes to update the notification
list. The current user might not be set yet, causing wrong notifications
to become visible.

Fixes: 145135488
Test: manual
Test: atest NotificationStackScrollLayoutTest
Change-Id: I34d1d5f9a751c1d7680a5a5941c39b9fe33a473b
Merged-In: I34d1d5f9a751c1d7680a5a5941c39b9fe33a473b
2020-02-03 16:25:36 +00:00
Fabian Kozynski
7891cda862 Merge "Do not destroy CustomTile when in QSCustomizer" into qt-qpr1-dev 2020-01-30 18:44:10 +00:00
Automerger Merge Worker
c866e0c52e Merge "Prevent sending early termination of appop use" into qt-dev am: c19818819e
Change-Id: I62af684babc2a3f444f1ba3b26ad70e6acfc238b
2020-01-23 18:00:09 +00:00
Fabian Kozynski
c8a7c2bd74 Do not destroy CustomTile when in QSCustomizer
Before this CL, TileQueryHelper would create CustomTile when creating
tiles for current tiles. This caused them to be destroyed after taking
the information and being removed from the maps in TileServices.

In this CL, current CustomTile are fixed to only being created by
addPackageTiles which knows what to do.

Fixes: 148002667
Fixes: 127508346
Test: manual
Test: atest TileQueryHelperTest
Change-Id: I2c4d3ce6c31449f20670982dad334019cc25469c
Merged-In: I2c4d3ce6c31449f20670982dad334019cc25469c
(cherry picked from commit 198b0b6ef1)
2020-01-23 14:34:53 +00:00
Fabian Kozynski
1a45963839 Prevent sending early termination of appop use
If a package starts a particular appop both as active and noted, once
one of them is finished (usually noted after 5s), a message will be sent
to callbacks indicating the end of the use. However, the app op may
still be active. This could result in the removal of indicators
prematurely from notifications.

This change prevents that from happening by checking if the app op is
still in use by that combination uid/package (either active or noted)
and not notifying listeners if that's the case.

Test: atest AppOpsControllerTest
Test: use app from bug report. Observe that notification does not lose
the microphone indicator
Bug: 144092031
Merged-In: I180e7c257e6171e7686ba7eda9bf02249358ed0

Change-Id: I94473c3ccf1318dac29f067dade91e540e20285e
2020-01-14 14:36:26 -05:00
TreeHugger Robot
30468d0963 Merge "DO NOT MERGE - Do not show Bluetooth icon when headset is not active" into qt-qpr1-dev 2019-12-16 11:04:37 +00:00
Abodunrinwa Toki
4828033816 Merge "RESTRICT AUTOMERGE Disable TextClassifier for RemoteInputView." into pi-dev 2019-12-11 21:58:38 +00:00
Ugo Yu
91182f3507 DO NOT MERGE - Do not show Bluetooth icon when headset is not active
Do not show Bluetooth icon when A2DP, HFP and Hearing
aid profiles are connected but not active.
Other Bluetooth profile will retain the same behavior.

Bug: 144061558
Test: atest com.android.systemui.statusbar
Change-Id: Id0fab356f041e90a7654c8e18185c6aa15e2d4df
2019-12-11 13:06:09 +00:00
Evan Laird
b0d526ac12 DO NOT MERGE: unrevert "Force FGS notifications to show for a minimum time"
See CL with change id (I0680034ed9315aa2c05282524d48faaed066ebd0) for
the meaningful changes/description. This change was reverted in qt-qpr1-dev
in order to fix a bug but never got unreverted due to the qt-dev CL
having the same change-id as the reverted one.

Bug: 119041698
Test: atest NotificationManagerServiceTest
Test: atest ForegroundServiceNotificationListenerTest
Change-Id: I50f16072b0e56ab69aabf8010ffffd172ca7c05a
2019-12-09 17:15:00 -05:00
Wilson Wu
fc3f1408da Merge "Support showing alignment hint based on aligniment state of dock" into qt-qpr1-dev 2019-11-26 10:29:40 +00:00
Jerry Chang
4bbf1596b9 Support showing alignment hint based on aligniment state of dock
Bug: 141984730
Test: atest SystemUITests:KeyguardIndicationControllerTest
Change-Id: Ic0911683725a0e54406df06b948169c4dde94764
Merged-In: Ic0911683725a0e54406df06b948169c4dde94764
2019-11-26 11:03:10 +08:00
Govinda Wasserman
f924933058 Merge "Rename PhenotypeHelper to DeviceConfigHelper" into qt-qpr1-dev 2019-11-22 13:27:32 +00:00
Satakshi
da07b0eec5 Passing feedback for screenshots in SysUI
(cherry picked from commit aaf695366e)

Test: Took a screenshot and verified that AiAi gets notified for
share/edit/delete/smart action clicked and exceptions thrown.
Ran tests-
'atest ScreenshotNotificationSmartActionsTest'
'atest ScreenshotNotificationSmartActionsGoogleTest'
Bug: 141634285
Change-Id: Ief6400549b30cf1c0c8a374aa443cf6347f84875
Merged-In: Ief6400549b30cf1c0c8a374aa443cf6347f84875
2019-11-20 09:51:00 -08:00
Satakshi
ce35ce9f08 Screenshot Notification Smart Action: AiAi and - Sys UI integration
Create a constant in ContentSuggestionsManager, which will
be used to pass a hardware bitmap to ContentSuggestionsService.
In the presence of this key in the request extras, we skip taking a
snapshot in ContentSuggestionsPerUserService.
Bitmap is extracted from reading this value from extras in
ContentSuggestionsService.

Create ScreenshotNotificationSmartActionsProvider, which is overridden
in GoogleSystemUI.
Calling AiAi is guarded by a device config flag created in cl/277143225.

(cherry picked from commit d2010f2628 and c45d86fc15)

Test: Manually tested the code in this CL and corresponding change in SystemUIGoogle.
Took a screenshot and verified that AiAi gets invoked and the screenshot notification
shows smart actions.
Ran new tests added in this CL
'atest ScreenshotNotificationSmartActionsTest'
'atest ContentSuggestionsPerUserServiceTest'
Bug: 141634285
Change-Id: I439a4be9aac53fb02b566ae4d438afe3edf2b37a
Merged-In: I439a4be9aac53fb02b566ae4d438afe3edf2b37a
2019-11-18 16:06:08 -08:00
Govinda Wasserman
5a844a2191 Rename PhenotypeHelper to DeviceConfigHelper
This class is used for simplifying interaction with the device
configuration and for testing. The new name is more descriptive of its
intended purpose.

Test: Tested locally
BUG:143952102
Change-Id: I5d9edf518b92f48d73e2ed5d142a162d348d24ba
Merged-In: I5d9edf518b92f48d73e2ed5d142a162d348d24ba
2019-11-12 20:36:47 +00:00
TreeHugger Robot
51a159329f Merge "Dedup smart reply updates for bubble flyout [DO NOT MERGE]" into qt-qpr1-dev 2019-11-07 18:29:49 +00:00
Lucas Dupin
b54d7e2a03 Hide "swipe up to unlock" when entering Doze
"Swipe up to unlock" should only be visible when the screen is
interactive, even though it would last for 5sec otherwise.

Test: manual
Test: atest KeyguardIndicationControllerTest
Fixes: 139400542
Change-Id: If7290459a3ae28f689cf4c9e2311398e5f6bcf13
Merged-In: If7290459a3ae28f689cf4c9e2311398e5f6bcf13
2019-11-06 15:51:08 -08:00
Lyn Han
0ee7184551 Dedup smart reply updates for bubble flyout [DO NOT MERGE]
[Cherrypicked from master]

Smart reply updates are not visually interruptive and bubbles should not
show flyout for them, since flyout text remains the same.

1) Modify NoMan.isVisuallyInterruptive to skip evaluation of fields
irrelevant to bubbles

2) Modify NotificationComparator to rank interruptive notifs higher

3) Pipe bool (isInterruptive) from system_process to SysUI
	NoMan --- set bool on notif record and ranking
	Ranking --- parcel bool for cross-process transport
	SysUI notif entry --- get bool from ranking
	SysUI bubble data --- on notif entry update, suppress flyout if isInterruptive=false

	Considered adding "isInterruptive" bool to StatusBarNotification.
	Did not because "visually-interruptive" is additional information that the
	system figured out and SBNs should be limited to info from the app.

4) NoMan --- schedule ranking update if interruptive changes for bubble

Fixes: 138755533
Test: manual - send one sms => flyout appears once
Test: manual - send multiple sms in a row => flyout appears for each one
Test: atest FrameworksUiServicesTests
Test: atest NotificationComparatorTest
Test: atest SystemUITests
Change-Id: Id4b855054689ee73a109bb7cd18004531b41f28c
(cherry picked from commit 0dddc61824d091e48962e36939828cae3cde2aa9)
2019-11-01 14:31:40 -07:00
Selim Cinek
f97d7f73cf DO NOT MERGE Revert all scrim related changes in qpr
This reverts commit 9449cfc4a6.
This reverts commit 22fa97577f.
This reverts commit bde48202e7.

Bug: 141649119
Bug: 143195895 is also fixed on my taimen with the above.
Bug: 143185828
Test: atest SystemUITests
Change-Id: I225b10fef2f88d3436ef3a683c09717467b071ad
2019-10-26 04:19:50 +00:00
Selim Cinek
3ce82b7ae4 Merge "Dismissed keyguard gone runnables when aborting" into qt-qpr1-dev 2019-10-10 21:01:53 +00:00
Lucas Dupin
dd78b67df8 Merge "Keep interrupts on when in battery saver mode" into qt-qpr1-dev 2019-10-08 23:48:13 +00:00
Evan Laird
5136eefeb3 Force FGS notifications to show for a minimum time
It's possible for a service to do a start/stop foreground and cause a
couple of things to happen:

NotificationManagerService will enqueue a EnqueueNotificationRunnable,
post a PostNotificationRunnable (for the startForeground), and then also
enqueue a CancelNotificationRunnable. There is some racy behavior here
in that the cancel runnable can get triggered in between enqueue and
post runnables. If the cancel happens first, then
NotificationListenerServices will never get the message.

This behavior is technically allowed, however for foreground services we
want to ensure that there is a minmum amount of time that notification
listeners are aware of the foreground service so that (for instance) the
FGS notification can be shown.

This CL does two things to mitigate this problem:

1. Introduce checking in the CancelNotificationRunnable such that it
will not cancel until after PostNotificationRunnable has finished
executing.

2. Introduce a NotificationLifetimeExtender method that will allow a
lifetime extender to manage the lifetime of a notification that has been
enqueued but not inflated yet.

Bug: 119041698
Test: atest NotificationManagerServiceTest
Test: atest ForegroundServiceNotificationListenerTest
Change-Id: I0680034ed9315aa2c05282524d48faaed066ebd0
Merged-In: I0680034ed9315aa2c05282524d48faaed066ebd0
2019-10-07 14:11:44 -04:00
Evan Laird
3b8c4743f6 Force FGS notifications to show for a minimum time
It's possible for a service to do a start/stop foreground and cause a
couple of things to happen:

NotificationManagerService will enqueue a EnqueueNotificationRunnable,
post a PostNotificationRunnable (for the startForeground), and then also
enqueue a CancelNotificationRunnable. There is some racy behavior here
in that the cancel runnable can get triggered in between enqueue and
post runnables. If the cancel happens first, then
NotificationListenerServices will never get the message.

This behavior is technically allowed, however for foreground services we
want to ensure that there is a minmum amount of time that notification
listeners are aware of the foreground service so that (for instance) the
FGS notification can be shown.

This CL does two things to mitigate this problem:

1. Introduce checking in the CancelNotificationRunnable such that it
will not cancel until after PostNotificationRunnable has finished
executing.

2. Introduce a NotificationLifetimeExtender method that will allow a
lifetime extender to manage the lifetime of a notification that has been
enqueued but not inflated yet.

Bug: 119041698
Test: atest NotificationManagerServiceTest
Test: atest ForegroundServiceLifetimeExtenderTest
Change-Id: I0680034ed9315aa2c05282524d48faaed066ebd0
Merged-In: I0680034ed9315aa2c05282524d48faaed066ebd0
2019-10-04 16:54:50 -04:00
Selim Cinek
300dcfb7c3 Dismissed keyguard gone runnables when aborting
Previously those actions could linger around
and lead to a variety of bugs.
Also fixed an issue when gutsManager calls were overlapping
to protect against these issues

Fixes: 130885521
Test: atest SystemUITests
Test: see bug description
Change-Id: Iffe37e6d48bbc9c26ba92f362d7b67bf743c7c28
2019-10-01 16:18:02 -07:00
Selim Cinek
22fa97577f Only calling finishedwhen all the animations have finished
Previously we would finish way too early if any of the scrims
finished animation. Since some scrims almost never change, we
would have animations being terminated early.

Fixes: 141649119
Test: unlock with bypass, observe no lock icon change
Change-Id: I6aefd6a27ef315995d8e1ae62c27a5f33cc9e160
2019-09-30 09:58:20 -07:00
Lucas Dupin
6edeb18701 Keep interrupts on when in battery saver mode
Battery saver was completely aborting the doze service, disabling
all interrupts. This is not ideal since it impacts the user journey,
especially when using face auth.

From now on the screen will still be off, but DozeService will be
retained, in order to receive sensor events.

Test: w/ battery saver: lift, tap, and observe aod being off
Test: w/ battery saver: receive notification, no HUN.
Test: w/o battery saver: lift, tap, and observe aod being on
Test: w/o battery saver: receive notification, HUN is received.
Fixes: 134157254
Change-Id: I9b713c78857c4e4c22d8d9bfff165b1b51dfd804
Merged-In: I9b713c78857c4e4c22d8d9bfff165b1b51dfd804
2019-09-27 16:12:21 -07:00
TreeHugger Robot
99c07af2bf Merge "DO NOT MERGE Allow for HTML styling in mobile data type content descriptions" into qt-qpr1-dev 2019-09-25 17:57:10 +00:00
Evan Laird
83c87e50b1 DO NOT MERGE Allow for HTML styling in mobile data type content descriptions
This CL implements a (somewhat hacky) way to enable HTML attributes in
the mobile data type content description strings. This way we can use
some basic styling in the Quick Settings cellular data tile which uses
it in a TextView.

We do this by assuming that the content description is valid, escaped
HTML, and send two separate CharSequences to all of the listeners, all
of which can then decide if they need the regular content description or
the prettified version.

Test: atest SystemUITests; system ui demo mode
Bug: 141177147
Change-Id: Idf387111b0cdc34ad3762eac0ec6c2b484b393e3
2019-09-25 11:12:37 +00:00
TreeHugger Robot
513a591c02 Merge "Apply front scrim to doze pulsing" into qt-qpr1-dev 2019-09-21 00:59:16 +00:00