summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Delete unused code from NotifLockscreenUserManagerSteve Elliott2022-08-291-17/+0
| | | | | | Bug: 200269355 Test: atest SystemUITests Change-Id: I8d0546eab8f66ad76636c1212c15cda386f522da
* Trigger re-inflate when sensitive setting changesSteve Elliott2022-06-031-0/+20
| | | | | | | | | | | | Fixes: 230581048 Test: manual 1. Post messaging style notification w/ Notify.apk 2. Enable redaction of sensitive notifications on lock screen 3. Lock device Observe: Notification is showing redacted view on lock screen Change-Id: I393ae6c465b2e86a3dbb88414f784fe871390f38 Merged-In: I393ae6c465b2e86a3dbb88414f784fe871390f38
* Revert "Don't show "Clear All" w/ redacted notifs"Daniel Sandler2022-05-191-9/+4
| | | | | | | | | | | | | | | | | Revert "Update NotifLockscreenUserMgrGoogle constructor" Revert "Update ArcNotifLockscreenUserMgr constructor" Revert submission 17183599-pipeline-clearall Reason for revert: b/232727914 b/232587284 Reverted Changes: I84e9f909e:Update ArcNotifLockscreenUserMgr constructor Ic88341de0:Update NotifLockscreenUserMgrGoogle constructor Ibc66576d2:Don't show "Clear All" w/ redacted notifs Change-Id: Ie7469cb568471f4739a8c591ccc6d669895a8315 Merged-In: Ie7469cb568471f4739a8c591ccc6d669895a8315
* When a user is removed make sure we remove their persisted bubblesMady Mellor2022-05-161-0/+1
| | | | | | | | | | | | | | | | - Update the NotificationLockscreenUserManager code to listen for account removals and notify the new listener method onUserRemoved - Use this to trigger removals in the bubble data repository / UI Some users may have a parent user (e.g. work profile can belong to a parent user). We store persisted bubbles under the parent user and have a separate field for the specific bubble user. To support this, I pass the parent of the removed user. Test: atest BubbleVolatileRepositoryTest BubbleDataTest Bug: 218525763 Change-Id: Ia147cbac15ebce70bbbcc52926089f33901a99dc Merged-In: Ia147cbac15ebce70bbbcc52926089f33901a99dc
* Don't show "Clear All" w/ redacted notifsSteve Elliott2022-05-101-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic that determined when to show the Clear All Silent button in the Silent notification header was occurring when the Silent (and Minimized) sections update. At this time, there was no up-to-date information about whether or not the notification has senstive content (SensitiveContentCoordinator occurs later in the pipeline), and no information about whether or not sensitive content can even be shown or must be redacted (handled by NotificationStackScrollLayoutController). Additionally, the visibility of the Clear All button in the shade footer wasn't being adjusted at all under the new pipeline. To remedy this, the following changes were made in this CL: 1. `boolean NotificationEntry#isSensitive()` has been dismantled. Rather than relying on some separate code to properly set this value at some point, instead the concept of "Sensitive Content" is derived directly from the SBN + Ranking, and is kept separate from the state of the user's settings, as well as the state of the lockscreen (whether we would currently need to redact). 2. NotificationLockscreenUserMananger is the de-facto place for tracking and querying redaction state. This includes checking if the user's settings *would* require redaction (#needsRedactionInPublic), and whether a user is actually public (#isLockscreenPublicMode). 3. In order to keep clients in sync, a new observable interface is exposed on NotificationLockscreenUserManager that clients can use to be notified when to requery #needsRedactionInPublic, due to user settings changes. This replaces NotificationEntry#OnSensitivityChangedListener 4. SensitiveContentCoordinator has been removed entirely; the pipeline no longer needs to invoke NotificationEntry#setSenstive, since it no longer exists. 5. NotifStats has been updated to include additional information extracted from the NotifCollection necessary to dynamically query for redaction in the View layer, without needed to re-process the entire list; specifically, we track a Set of users that currently have sensitive notifications in the shade. This set is tested against the user's settings (tracked separately from the pipeline in NotifLockscreenUserManager). Test: atest Test: 1. Turn on notification redaction (no sensitive contents on lockscreen) 2. Receive a silent sensitive notification 3. Lock the device 4. Double tap camera 5. expand shade Observe: Clear all hidden in footer and in silent header Fixes: 213443266 Fixes: 230581048 Change-Id: Ibc66576d28a48f7c82cad875ed2dcb57a7b23f10 Merged-In: Ibc66576d28a48f7c82cad875ed2dcb57a7b23f10
* Break circular dependencies in notif codeNed Burns2021-05-131-0/+11
| | | | | | Bug: 186481467 Test: atest Change-Id: Ie5b07bda46c2d217f5eb3be341595a6cb70fdd57
* Current user and work profile availability in peoplehubSteve Elliott2020-01-081-1/+8
| | | | | | Fixes: 144285253 Test: manual, atest Change-Id: I94afce96f6e164e7f4d4bb212920e3de8c5c1208
* Add Coordinators to the NewNotifPipelineBeverly2019-12-041-0/+10
| | | | | | | | | | | | | | | Coordinators added to NotifCoordinators will be passed the initialized NotifListBuilder and NotifCollection when they're ready for Pluggables, NotiLfetimeExtenders and NotifCollectionListeners to be registered. This CL adds the KeyguardCoordinator which filters notifications based on whether the keyguard is showing and user lockscreen notifcation settings Test: atest KeyguardCoordinatorTest Bug: 145134683 Change-Id: Ie5a2c0f696a6eedbed203b1b5809164742d23132
* Fix issue with media notifs being misbucketedNed Burns2019-07-231-2/+1
| | | | | | | | | | | | | | | | | | Previous code assumed that "isHighPriority" == "is in top section", which is not always true. Media notifs and some other notifs can appear in the top section even if they're not high priority. Because we detect section boundaries by iterating through the list until we find the first notif where isHighPriority == false, we were sometimes drawing the section boundary way too high. This change creates a new propery, isInTopSection() that accurately tracks this state. Setting this value in the proper location would require some seriously destabilizing refactors, so instead we set it in the list comparator, which is awful but here are. Test: manual Bug: 136709564 Change-Id: I19223720bac534ab92219a2962169097819e8efb
* Implemented dynamic privacy for redacted lockscreensSelim Cinek2019-04-171-0/+8
| | | | | | | | | | Users with redacted lock screens now dynamically are able to see the contents of their notifications whenever they are authenticated. Bug: 128037042 Test: atest SystemUITests Change-Id: If289a8a9ddb300e1398f9e715511beb5a5fd5c5d
* Remove unused destroy methodsyoshiki iguchi2019-02-071-2/+0
| | | | | | | These destroy methods are never called so this CL removes them. Test: build passes Change-Id: I70d381be3ada96a4d2e52f1330d26eff8620437e
* Adds setting for direction of dismiss gesture.Gus Prevas2019-01-241-0/+8
| | | | | | Bug: 122314709 Test: atest SystemUITests, manual Change-Id: I829c4148b6d5afc7b106d706d677c6105ec0f078
* Extract NotificationData.Entry to top-levelNed Burns2019-01-071-2/+2
| | | | | | | | | | NotificationData.Entry -> NotificationEntry Both NotificationData and NotificationEntry moved `notification.collection` package. Test: atest Change-Id: Ia7158eb732711ddb324e514edb9884d518edab87
* Replaces binary flag for new interruption model with secure setting.Gus Prevas2018-11-081-3/+0
| | | | | | Bug: 116622974 Test: n/a Change-Id: I8445e5db49ba3f87046332624c0a705cc082ab59
* Flag-guards changes to status bar and lockscreen.Gus Prevas2018-11-021-0/+3
| | | | | | | | | | | This change restores low-priority notifications to the status bar and lockscreen and adds a flag to remove them once the rest of the UI changes are complete. Fixes: 118754096 Fixes: 118805186 Test: manually Change-Id: I300d04e94fa4fbe5c00b91d78f99a45960886870
* Make StatusBar not be a NotificationPresenterJason Monk2018-10-231-484/+29
| | | | | | | | | | | | | | | | | | | | Break the NotificationPresenter out of the StatusBar and most of the logic with it. - Break RemoteInput Callbacks out of NotificationPresenter - Break Environment Callbacks out of NotificationPresenter - Add ShadeController interface for StatusBar (abstraction layer from StatusBar) - Add InitController to allow for post-init tasks (dependency resolution should not go here) - Make some dependencies (ShadeController, NotificationEntryManager, NotificationLockscreenUserManager usually) lazily-resolved to break some dependency cycles - Lots of other cleanup Test: Existing tests do not pass Change-Id: Ic043c6b15a4ffe551fc27f99b25d5c3caa1be582
* Remove updatePublicMode from StatusBar.javaEvan Laird2018-09-181-2/+53
| | | | | | | | | | | | | There is still one place where status bar needs to notify NotificationLockScreenUserManager to updatePublicMode (for the notification showing sensitive info bug). Otherwise, this commit removes udpatePublicMode from StatusBar and should have the exact same call semantics as before. Test: `atest SystemUITests` Bug: 112656929 Change-Id: I4fe6bc1d6519ae12581f3c17f14c2fcb505eb5f5
* Organize notification classes in row/stackRohan Shah2018-07-181-4/+2
| | | | | | | | | | | No functional changes. Reorganized logic under either row, stack, logging, or row/wrapper. Haven't moved all classes over since there's some classes that create conflicts due to weird use of package-private/protected (primarily waiting for HUN and shelf classes). Test: built, ran, used notifications Bug: 110802404 Change-Id: Ia2152603bdbeb12c522360193511946c843b9266
* Remove managed profile toastJulia Reynolds2018-06-191-24/+0
| | | | | | Change-Id: I9f324a94d7fab35b0f00a1bd9c675708dac6f85a Fixes: 110418889 Test: atest SystemUITests
* Moved some activities implementation to ActivityTaskManagerService (2/n)Wale Ogunwale2018-06-121-1/+2
| | | | | | | | | | | | | Second step in unifying the window hierarchy that is currently split within AM and WM packages. We move some of the API implementation for activities from ActivityManagerService.java to ActivityTaskManagerService.java. Test: Existing tests pass Test: go/wm-smoke-auto Bug: 80414790 Change-Id: I23dcd924493d8ad1e0b6e3a55386fd72b0146605
* Avoid binder calls when unlockingLucas Dupin2018-05-181-4/+2
| | | | | | | | | | | - User StrongAuthTracker instead of LockPatternUtils. - Do not call NotificationViewHierarchyManager#updateRowStates twice, because mEntryManager will do it. - Do not apply doze state and it doesn't change. Bug: 77823972 Test: ./external/chromium-trace/systrace.py power gfx freq am wm sched binder_driver view -a com.android.systemui -o ~/Desktop/sysui_unlock.html Change-Id: I0a92bab79ea47db1885f5dab5c87962e465ccdfe
* Add rank & count event to notification clicks and dismissesDieter Hsu2018-04-181-1/+7
| | | | | | | | | | For click/action click/dismiss, passing rank(0-based) and count at the time of the actions to events. Bug: 70724602 Test: runtest systemui-notification Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/notification Change-Id: I07c440f84ccb745f744eb4e317881b72d2b41683
* Show work notifications in the shade unless on keyguard.Pavel Grafov2018-03-271-9/+11
| | | | | | | | | | | | | | | | | | | | | 1. Make work profile notifications redacted but visible if only work profile is locked (i.e. not on the keyguard). Previously if the user disables notifications on the lockscreen, work notifications will disappear from notification shade when the profile is locked even if the device itself is not locked. To achieve this NotificationLockscreenUserManager now checks notification status for a given user rather than system-wide. When the keyguard is locked, system-wide setting will still prevent work notification from being visible. 2. Fix bug introduced by previous CL, since isCurrentProfile is alwoays true for mCurrentUser, it caused notifications to be visible on keyguard when they shouldn't. Test: manual, tried combinations of device and profile settings Test: runtest systemui Bug: 64829587 Change-Id: I104e938b15897a909c086c62e273f922b96ba7db
* Update work notifivation settings on upgrade.Pavel Grafov2018-03-201-1/+1
| | | | | | | | | | Work notifications settings should only allows the user to cause notifications to be redacted, not hidden alltogehter. If some user had it hidden, change it to redacted on upgrade. Bug: 64829587 Test: manual Change-Id: Iff88638b2536481fb7ff66ac8a29512c95fbada6
* Hide notifications when in Lockdown modeChad Brubaker2018-03-151-1/+16
| | | | | | | | | | | | | When the user triggers lockdown the device is put into a secure state, beyond disabling less secure unlock modalities this should also disable notifications so that data is not leaked despite the device being strongly locked. Fixes: 74564088 Test: Entered lockdown, verified notifications are no longer displayed on the lockscreen Change-Id: I4188c36b11a1b0cd496b8032bd246f0413c911c5
* Assume the worst when EntryManager is missing.Jeff Sharkey2018-02-031-0/+12
| | | | | | | | | | It's somehow missing during pre-submit tests, so try patching over to help tests pass. It triggers wtf() to help ensure we chase down to zero. Test: sure Bug: 72898411 Change-Id: I8972da72579f2a4d83aecc9255a74ea9406fd64f
* Merge "Fix "You're using your work profile" toast is shown when launcher is ↵TreeHugger Robot2017-12-271-19/+18
|\ | | | | | | ...in foreground"
| * Fix "You're using your work profile" toast is shown when launcher isTony Mak2017-12-271-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...in foreground What's the problem: getRecentTasks no longer returns home task. Check RecentTasks.isVisibleRecentTask Solution: Instead of "fixing" getRecentTasks, use getLastResumedActivityUserId, which is already used for the work profile icon in status bar. Note that Keyguard is not an activity, so it won't change the value of "last resumed activity user id". It should be more lightweight than getRecentTasks anyway. Test: Open any personal app -> screen off and on -> no toast Test: Open any work app -> screen off and on -> observe toast Test: Open any work app -> tap home -> scren off and on -> no toast Change-Id: I1cc880bfa23017c9d2c5ad99d57e67b430aa4ac8 Fix: 70377375
* | Remove NotificationPresenter#getEntryManager.Eliot Courtney2017-12-261-7/+10
| | | | | | | | | | | | | | | | | | | | Instead, pass it along with calls to setUpWithPresenter. Bug: 63874929 Bug: 62602530 Test: runtest systemui Test: Compile and run Change-Id: Icd60cf671b12b33d4565cc608c6141cd580c790e
* | Split NotificationEntryManager out of StatusBar.Eliot Courtney2017-12-261-6/+6
|/ | | | | | | | | | | | NotificationEntryManager is responsible for the adding, removing, and updating of notifications among other things, such as their inflation and their interaction with other Notification*Manager objects. Bug: 63874929 Bug: 62602530 Test: runtest systemui Test: Compile and run Change-Id: I56f8c524875900112cdf9f6120407b61e201172f
* Split NotificationUserManager out of StatusBar.Eliot Courtney2017-11-301-0/+455
This class handles functionality related to private/public contents, redacting notifications, whether to show notifications on the keyguard, and user changes. Bug: 63874929 Bug: 62602530 Test: runtest systemui Test: Compile and run Change-Id: If44fdf5f89c1e72c4bd5f49731fd4a158ea50552