summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/statusbar/SmartReplyController.java
Commit message (Collapse)AuthorAgeFilesLines
* Remove FileDescriptor from systemui.Dumpable.Dave Mankoff2022-04-051-2/+1
| | | | | | | | | | This is the first step in moving over to the new public android.util.Dumpable api. Bug: 217567642 Test: m SystemUI Merged-In: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0 Change-Id: Ibaebcfb2c6c5326d0c45b8c72d868c76655d89a0
* [Status Bar] Re-name StatusBar.java -> CentralSurfaces.java.Caitlin Cassidy2022-02-281-2/+2
| | | | | | | | | | | Also add some javadoc to CentralSurfaces.java to make its purpose slightly clearer. Bug: 197137564 Test: compiles Test: atest SystemUITests Change-Id: Id06e7ba7641d6d2bc276cce57101c9c7236bc758 Merged-In: Id06e7ba7641d6d2bc276cce57101c9c7236bc758
* New Pipeline: Add a NotificationVisibilityProvider to support both pipelinesJeff DeCew2021-11-091-12/+5
| | | | | | | | Fixes: 169655596 Fixes: 204183781 Fixes: 204770080 Test: atest SystemUITests Change-Id: I96cd96d1a037e7cca301242b1dba25ecdd72be9a
* Make SmartReplyController a DumpableJeff DeCew2021-10-301-3/+21
| | | | | Test: dump and inspect Change-Id: Id3e58ae6559ef1762496f46ff86ccd99886c8aaf
* Create a shim for StatusBarManager click methodsEvan Laird2020-05-181-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | `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 Change-Id: I42201d6e7b7ffe9ad4f19c774b638a36a51750ef
* Introduce StatusBarModuleSergey Nikolaienkov2020-02-141-5/+4
| | | | | | | | | This CL is the 3rd in the series of CLs which intend to "unbind" StatusBar on TV. In order to make StatusBar really optional and thus to allow us to unbind it, we also need to make some of the classes that depends on it optional as well. For all these cases we need to move from @Inject-annotated contructors to @Provides annotated methods. For this we are introducing StatusBarModule, as well as StatusBarPhoneDependenciesModule and StatusBarDependenciesModule - these two provide dependecies needed to build StatusBar, but not the StatusBar itself Change-Id: Ie3551bda7056465159f2c7fde4989e009f277304 Test: make SystemUI; atest SystemUITests Bug: 146188087
* Remove NotificationDataEvan Laird2019-11-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ye olde NotificationData class was responsible for a few general things: - Keep a list of visible `NotificationEntry`s - Filter / sort the visible entries - Keep a sorted / filtered list of those entries - Answer lots of questions about the entries themselves (rank, isAmbient, list of entries for current user, etc.) - Keep track of the current RankingMap - Set priority buckets on entries - Tell the group manager when things changed The basic idea here is to remove NotificationData in favor of 3 other changes: 1. Any place which needed to query NotificationData for info about the entry (in particular its ranking) can just ask the entry for it now. Entries all keep a reference to their rank 2. NotificationEntryManager now just maintains its own list of visible notifications. It was already the point of contact to get a handle to NotificationData so this makes call sites simpler. 3. Create a simpler NotificationRankingManager (maybe delete this eventually) to encapsulate the sorting logic and hang on to the latest RankingMap Test: atest SystemUITests Change-Id: I14073e103c6d50da37207ca8fd86828da0aaaff9
* Encapsulate NotifEntry.key and .notificationNed Burns2019-10-181-7/+7
| | | | | | | | | | | NotificationEntry.key -> getKey() NotificationEntry.notification -> getSbn() .key -> mKey .notification -> mSbn Test: atest Change-Id: Idcc56af5d941d600b2958afb9ed898fd7ab361cc
* Add logging for tap-to-edit smart repliesMilo Sredkov2019-02-051-7/+6
| | | | | | | | | | | | Log the status of getEditChoicesBeforeSending with the SMART_REPLY_VISIBLE and SMART_REPLY_ACTION events. Log whether the reply was changed before sending with the SMART_REPLY_ACTION event. Bug: 123407240 Test: atest NotificationManagerServiceTest SmartReplyControllerTest SmartReplyViewTest NotificationContentViewTest RemoteInputViewTest SmartReplyViewTest Change-Id: I92bf9b9486f023e7a1ab553c24a9d021dc2f3133
* Log notification location and assistant-generated when smart reply sentGustav Sennton2019-01-291-2/+3
| | | | | | | | | | | | | | When logging that a smart reply was sent, now also log where the notification (containing the reply) is shown, and whether the smart reply was generated by the assistant (or provided by the application itself). Bug: 120767764 Test: click smart reply from notification shade and from heads-up to ensure correct location is logged. Test: click smart reply with system-generated replies vs. app-generated replies to ensure we log generatedByAsssistant correctly. Change-Id: I43e1f5a07732d578d7890a6f059432c6d6e5038c
* Add NotificationVisibility.NotificationLocation.Gustav Sennton2019-01-231-2/+5
| | | | | | | | | To represent the UI location of a Notification we add the class enum NotificationVisibility.NotificationLocation. Bug: 120767764 Test: atest SystemUITests Change-Id: I572c1cb7e585158f29675afd5255898e7f78e820
* Extract NotificationData.Entry to top-levelNed Burns2019-01-071-6/+6
| | | | | | | | | | NotificationData.Entry -> NotificationEntry Both NotificationData and NotificationEntry moved `notification.collection` package. Test: atest Change-Id: Ia7158eb732711ddb324e514edb9884d518edab87
* Remove Dependency.get usages from SmartReplyControllerJason Monk2018-12-261-6/+6
| | | | | Test: atest SystemUITests Change-Id: I552075b4bb6165adcb8363b2c21dff4770f1ba2d
* Start using some dagger 2Jason Monk2018-12-191-1/+5
| | | | | | | | Early days as we start migration, so lots of duplication between Dependency and dagger2, but can be removed when migration is done. Test: existing tests. Change-Id: I00c3da6ebbd46a26e512d8a7aa1e2b828e08f33f
* Add logging for smart replies and actions.Gustav Sennton2018-12-181-3/+7
| | | | | | | | | | | | Log (using TRON) 1. when smart replies and actions are shown in a notification, and 2. when a smart action is clicked. Bug: 120767764 Test: manual - use logcat to ensure we log the correct values when a notification is expanded / smart action is clicked. Change-Id: I85dbc3ee355997142ad71b7b67a759e8fede94b6
* Add onActionClicked in NotificationAssistantServiceTony Mak2018-11-291-0/+24
| | | | | | | | | | | | | This is added to report clicks on actions buttons to NAS. BUG: 119010281 Test: atest SystemUITests Test: atest RemoteViewsTest Test: atest NotificationManagerServiceTest Test: Manual. Tapped on the action (both normal and contextual) and observed the log. Change-Id: I381994737d8c3185d3fabf9b6c481fd01a89a634
* Add onSuggestedReplySent in NotificationAssistantServiceTony Mak2018-11-271-3/+7
| | | | | | | | | | | | | | This is added to report clicks on smart reply buttons to NAS. Also refactored the code a bit by having SmartReplyView to use SmartReplies and SmartActions object, rather than passing a long list of arguments. Test: atest SystemUITests Test: Manual. Tapped on the reply and observed the log. BUG: 111437455 Change-Id: I897fb46a304f4f7b80b2a6bc4db0ac39f6dc6e8f
* Fixes import ordering.Gus Prevas2018-11-141-2/+0
| | | | | Test: n/a Change-Id: I432e11b52deb7974e50f62076af3b7aa07e364b6
* Refactor managers that defer notification removalKevin2018-08-311-7/+19
| | | | | | | | | | | | | | | | | | | | | | | 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
* Organize notification classes in row/stackRohan Shah2018-07-181-0/+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
* Keep notification when sending smart reply.Kenny Guy2018-05-171-4/+22
| | | | | | | | | | | | | | If an app cancels a notification while we are sending a smart reply then don't dismiss the notification. Bug: 79120026 Test: atest NotificationEntryManagerTest Test: atest SmartReplyControllerTest Test: atest statusbar.NotificationListenerTest Test: atest NotificationRemoteInputManagerTest Change-Id: Ibbc0014ae0aeb12b58be13c041d720903251490f
* Add spinner for smart replies.Kenny Guy2018-04-231-0/+60
Add a spinner to MessagingGroup that is enabled when the user has clicked on a smart reply. Bug: 73607490 Test: atest SystemUiTests Change-Id: I4d892c19b5df2b443761819929a83f016967e217