summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/wmshell/BubblesManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Fade out navbar on lockscreen -> homescreen transitionMike Schneider2023-04-061-2/+2
| | | | | | | | Introduces a new SYSUI_STATE_STATUS_BAR_KEYGUARD_GOING_AWAY QuickStepContract flag, to get an early signal when the keyguard is going away Bug: 275319714 Test: manual Change-Id: I06b925431ecc615e7445b386bd89a1c6f5198c84
* Change flag to sysprop because we need it in launcher tooMady Mellor2023-02-161-2/+0
| | | | | | | | | | Also introduces method to check if the bubble bar is showing since it depends on being on a large screen and the flag is true. Bug: 253318833 Bug: 256873975 Test: treehugger Change-Id: I484c83c49e3f6722b544e43b9f5706f653d630a4
* Publish dream state to OverviewProxyService.Bryce Lee2023-01-251-1/+2
| | | | | | | | | | | | | This change pipes the current dream state to OverviewProxyService, similar to how doze information is shared. A condition has been added to monitor the dream state, and a callback relays this information to the StatusBarStateController. A new CoreStartable maintains the monitor for this interaction. Test: atest StatusBarStateControllerImplTest#testSetDreamState_invokesCallback Bug: 265755700 Change-Id: Ic927a7e55864453da026c14cd1c87e6a7cf22489 Merged-In: Ic927a7e55864453da026c14cd1c87e6a7cf22489
* Remove CentralSurfaces from ShadeControllerJustin Weir2022-11-291-2/+2
| | | | | | | | | | | | | The methods ShadeController was calling in CentralSurfaces are now in ShadeController. A small amount of interaction between the two classes had to remain, but it's now a small interface instead of a direct dependency on CentralSurfaces. This work is far from done, but the dependency was removed and atest passed, so it seemed like a good place to stop and review. Bug: 249277686 Test: manual and atest Change-Id: Ide5c6f1964a83073f39323c083ea1ccc281bc8fe
* Add a flag for the bubble barMady Mellor2022-11-021-0/+6
| | | | | | | | | | | | | This is an UnreleasedFlag which is only available in SysUI, so we set it on Bubbles via BubblesManager which is part of SysUI. Changes to support bubble bar will happen behind this flag. Bug: 253318833 Bug: 256873975 Test: manual - enable flag and add a bubble on a large screen device - observe that the bubbles are pinned to the bottom Change-Id: I0d86a71b66db683837bf639d9067d92703b4364e
* Remove unused BubblesManager#maybeCancelSummary()Steve Elliott2022-08-311-22/+0
| | | | | | Bug: 145659174 Test: atest SystemUITests Change-Id: Ibeee6718452e2c0fbff3a5dd611c535ff90f59d2
* Remove NotifEntryManagerSteve Elliott2022-08-311-7/+0
| | | | | | | Bug: 200269355 Test: atest SystemUITests Change-Id: I3e418dfd7d3512ac811e67733e32818622a0a415 Merged-In: I3e418dfd7d3512ac811e67733e32818622a0a415
* Remove NotifGroupManagerLegacy usage from BubblesSteve Elliott2022-08-291-27/+4
| | | | | | Bug: 200269355 Test: atest SystemUITests Change-Id: If996315ae55f9f5b13159345b01bcea8f07a0ba4
* Merge changes I63c90f71,I0f016aab into tm-qpr-devWinson Chung2022-08-231-14/+1
|\ | | | | | | | | | | * changes: Minor cleanup Pipe user changed events to the Shell
| * Minor cleanupWinson Chung2022-08-191-14/+1
| | | | | | | | | | | | | | | | | | | | - Remove unnecessary/unused methods in Bubbles interface (it can use the shell dump callback instead) - Remove some unused methods exposed in one handed interface Bug: 238217847 Test: Presubmit Change-Id: I63c90f71b66b72c5a33ffa8d2b382b0feba443f9
* | Fix bubbles hiding when unlocked with showOnLockscreen ActivityMady Mellor2022-08-111-1/+16
|/ | | | | | | | | | | | | | | | | | | KeyguardStateController#isOccluded was being used to determine if the device was showing the screen saver / dreams. However, this method returns true even if the device is in unlocked state. This can happen when an activity is showing that has showOnLockscreen set to true even while the device is unlocked. This CL uses DreamManager to check if the device is dreaming instead of KeyguardStateController#isOccluded which only returns true if the device is actually showing screen saver / dreams. Bug: 240510360 Test: atest BubblesTest Test: manual - open calculator and verify bubbles remain visible - start dream and verify bubbles are hidden Change-Id: I6997c17d26c2f8ccbe80a5920f9348b3ce53d754
* Ignore updates to bubbles that aren't from the systemMady Mellor2022-08-051-4/+5
| | | | | | | | | | | | | The new notif pipeline code adds a concept of updates from the system vs from sysui. Currently bubbles is responding to all updates but I think we really only care about updates from the system (i.e. from NotificationManagerService). Bug: 238896626 Test: atest BubblesTest#testNonSystemUpdatesIgnored Test: atest --no-bazel-mode --iterations 20 PlatformScenarioTests:android.platform.test.scenario.sysui.bubble.ExpandAndDragToDismissTest (with vadim's CLs and a 2nd change to be uploaded) Change-Id: I3ffd6eb0f0a07448b2117924be514347c6e80b16
* Ignore notification update for not active userAts Jenk2022-07-291-2/+2
| | | | | | | | | | | | | | | | | We can receive notification updates for the not active user. Ensure that we do not pop up a bubble in these case. Store the notification key for these notifications in saved bubble data for the user that should get this bubble. When changing user back to the user that should get the notification, bubble will get restored as well. Bug: 237314340 Test: atest BubblesTest Test: Enable bubbles for incoming SMS in Messages app. Switch to secondary user. Get incoming messages and observe that they do not result in a bubble. Switch back to primary user and observe that bubbles are shown for SMS that came in. Change-Id: Ifcabb8458c72edc06f8cff844ac5e2266f5387f9
* Move ShadeController to the shade packageJustin Weir2022-07-271-1/+1
| | | | | | Bug: 238333941 Test: atest SystemUITests SystemUIGoogleTests Change-Id: Ibf332e4f8ca6af7ed22655cd5669ab36e9a41fbe
* Add keyguard callbacks to ShellInterfaceWinson Chung2022-07-201-1/+0
| | | | | | | | | | | - Currently multiple shell feature interfaces expose the same keyguard visibility callback, instead we can pipe this signal to the shell for controllers to register for events. Bug: 238217847 Test: atest WMShellUnitTests Test: atest SystemUITests Change-Id: I96125e9f3796c8303683c9314f13884121ded39d
* Add single interface for SysUI to call into ShellWinson Chung2022-07-181-21/+0
| | | | | | | | | | | | - Currently update configuration callbacks to use this interface so that individual features don't need to expose their own config change callbacks. Will followup with moving keyguard/shell init /shell command handler. Bug: 238217847 Test: atest WMShellUnitTests Change-Id: Id526ed588de8cf962e821a3b9e1933a67f354d77
* Inline notif pipeline flag into BubblesManagerSteve Elliott2022-06-301-155/+1
| | | | | | | | | This change is a no-op; the flag is now enabled-by-default, so all removed code paths here are effectively dead. Bug: 200269355 Test: atest SystemUITests Change-Id: I5ccc8d1926a5973ba02bfc20c565a18ec100d805
* Merge "When a user is removed make sure we remove their persisted bubbles" ↵Mady Mellor2022-05-181-0/+5
|\ | | | | | | | | | | | | | | | | into tm-dev am: f0f1105de7 am: dd7397e3d5 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18153123 Change-Id: Ia9cb0ff9d31de4ba8d5fbc1d2227319ad45eeb4b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| * When a user is removed make sure we remove their persisted bubblesMady Mellor2022-05-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | Bubbles ignore gestures when notif expandedAts Jenk2022-05-131-1/+9
|/ | | | | | | | | | | | When bubbles are expanded we monitor for home gesture to animate collapsig of the view. When notification panel is open, it is on top of bubbles. But our gesture monitor is still active. Listen to notification panel expanded state and stop listening for home gesture while panel is expanded. Bug: 232339931 Test: atest PlatformScenarioTests:android.platform.test.scenario.sysui.bubble.BubblesHomeGestureTest Change-Id: I123ea6b5b82906d2ed1b0a71fc1e2fa9669abfff
* Merge "Remove FileDescriptor from systemui.Dumpable." into tm-devDave Mankoff2022-04-071-3/+2
|\
| * Remove FileDescriptor from systemui.Dumpable.Dave Mankoff2022-04-051-3/+2
| | | | | | | | | | | | | | | | | | | | 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
* | Process only app initiated removals in onEntryRemoved callbackSergey Serokurov2022-04-011-1/+3
|/ | | | | | Bug: 220066165 Test: atest SystemUITests Change-Id: Ica339c74c26e7a360749a3d23151ad701093b6aa
* Use KeyguardStateController to listen for unlocked shade stateMady Mellor2022-03-301-14/+27
| | | | | | | | | | Using keyguard state controller allows us to check the occlusion state and hide / show based on that as well. Test: manual - have screensaver turn on and ensure bubbles are hidden Test: atest BubblesTest NewNotifPipelineBubblesTest Bug: 223913857 Change-Id: I29992ed76c7cdd4e99b4920849c143f6520f9c42
* Update FLAG_BUBBLE in BubblesManager#onUserChangedBubbleSergey Serokurov2022-03-031-0/+2
| | | | | | Bug: 191606745 Test: atest SystemUITests Change-Id: Icc6c9b534b556cf45e7c23e9392a2a3a0c24942a
* Handle channel changes for bubblesMady Mellor2022-01-181-2/+37
| | | | | | | | | | | | | | | | Bubbles in the overflow might not have an active notification associated with them, this means if the user disables bubbles for that conversation through settings we wouldn't be able to know and remove the bubble from the overflow. This change pipes the onNotificationChannelModified signal from NotificationListenerService through sysui & to bubbles for both the pipeline & NEM version & uses this signal to remove matching bubbles from the overflow if appropriate. Test: BubblesTest NewNotifPipelineBubblesTest NotificationEntryManagerTest NotifCollectionTest Bug: 171235607 Change-Id: I3d4889ece13d550e0cceb20036718faee4887489
* Convert BubblesManager to use CommonNotifCollection.Julia Tuttle2022-01-101-24/+24
| | | | | | Bug: 209522962 Test: atest --test-mapping frameworks/base/packages/SystemUI:presubmit Change-Id: If01db3cffa18957617bcefbd40b214c86bd1ac92
* Update FGS notification behaviorJulia Reynolds2022-01-071-1/+1
| | | | | | | | | | | | | | | | | | | Allow FGS notifications to be individually dismissed bu users, but not clearable by clear all. Apps still cannot dismiss their FGS notifications. Also cleaned up some code from a previous 'allow dismissal' project. Bug: 201579707 Test: atest SystemUITest Test: atest NotificationManagerServiceTest Test: flip flag, clear all does not dismiss a FGS but individual swipe does Test: without flag FGSes are not dismissible Test: verify swipe/dismiss behavior for notif with FLAG_NO_CLEAR Test: verify swipe/dismiss behavior for notif with FLAG_ONGOING_EVENT Change-Id: Ibf9f55df400b7e9984d3fda5e6959878474f9886
* Inline most FeatureFlags methods.Dave Mankoff2021-11-171-5/+5
| | | | | | | | These methods are better off inline. Bug: 203548827 Test: manual Change-Id: I83b4d15d5915696519c94752c446978003b0679e
* New Pipeline: Add a NotificationVisibilityProvider to support both pipelinesJeff DeCew2021-11-091-7/+7
| | | | | | | | Fixes: 169655596 Fixes: 204183781 Fixes: 204770080 Test: atest SystemUITests Change-Id: I96cd96d1a037e7cca301242b1dba25ecdd72be9a
* Add a sysui state for manage menu being expandedMady Mellor2021-10-081-0/+14
| | | | | | | | | | | | This is needed to properly scrim taskbar when bubbles are expanded with the manage menu open. Added tests around hiding / showing the menu and verifying the state. Bug: 197139718 Test: BubblesTest NewNotifPipelineBubblesTest Change-Id: I52e41344f9273398cea606c227dfcf3b8cc6394d
* Move FeatureFlags to flags package.Dave Mankoff2021-07-301-1/+1
| | | | | | | Bug: 194781951 Test: compile Change-Id: I851f941487985ddf5aebd0be39e9f8387e50933f Merged-In: I851f941487985ddf5aebd0be39e9f8387e50933f
* Don't use SysUI ScrimController for bubblesMady Mellor2021-07-291-19/+0
| | | | | | | | | | | | | | Changes for the manage menu will require a scrim between the expanded view and the manage menu. I think it makes sense to just have BubbleStackView control the scrims entirely rather than have 1 in ScrimController and 1 in BubbleStackView (or 2 scrims in ScrimController). Test: manual - expand a bubble, there's a scrim behind it, collapse the bubble, the scrim is gone. Bug: 183658858 Change-Id: I537c910b959ab938eb1d116d9dc0c801006dbb79
* Add cached state to prevent blocking calls from SysUI->ShellWinson Chung2021-06-161-1/+1
| | | | | | | | | | | | | | | | - WindowManagerGlobal has a shared lock which means that code in the shell main thread can deadlock with code running on the sysui main thread in rare cases (ie. display changes when folding/unfolding). Ideally there are no blocking calls between SysUI/Shell so this change caches state changes from the Bubbles side for querying from SysUI. In particular, the expanded states and the suppressed states. Bug: 190453559 Test: atest SystemUITests Change-Id: I4e60b168a84618033604e7d097599b048a5886a1
* Fix launching bubbles from widgetsMady Mellor2021-06-141-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | There were a couple of issues: 1) onActivityRestart wasn't checking for bubbles in the overflow so there were cases where we could open a bubble but weren't 2) delay opening the bubble until after the transitions have happened when launching from a widget, the transition could alter the placement of the bubble's surface resulting in weird UI. Test: atest LaunchConversationActivityTest Test: manual 1) have a bubble & convo widget for it 2) tap on the widget => bubble opens normally, close the bubble & repeat that a bunch 1) have an unopened bubble & convo widget for it 2) get enough bubbles to push it out of the stack & out of the overflow 3) tap on the widget => bubble opens 1) have a bubble & convo widget for it, dismiss bubble 2) tap on the widget => bubble opens normally Bug: 188306336 Change-Id: Id68ccbfbfc6fc6949cfc257df4706b470fb78569
* Don't auto expand the bubble when it's marked as priorityMady Mellor2021-05-031-1/+0
| | | | | | | | Bug: 186684456 Test: manual - get a convo notif that can bubble - mark it as priority => notice the bubble is created but not auto-expanded Change-Id: I4eec565bb1e32cbe4a53fa1e7db73f35fbabe730
* A new shade pull down animationLucas Dupin2021-04-241-1/+1
| | | | | | | | | Test: manual Test: atest ScrimViewTest Test: atest ScrimControllerTest Bug: 185683835 Fixes: 184891403 Change-Id: I1c51f3dc0d8afe97457aea8712c4322ebbda6ae4
* Sysui bubbles multiuser fixes: persistence / overflowMady Mellor2021-04-191-0/+8
| | | | | | | | | | | | | | | | | * Persist bubbles per-user - rather than one list the XML now has a list per-user. The entries in these lists still include userId for workprofile since bubbles are mixed in the stack / overflow for workprofile. * When loading bubbles, only the ones for the current user are loaded / hit bubbleController code * When user changes, overflow data should be re-loaded * Allow the bubble window to be visible for all users Test: atest BubbleXmlHelperTest BubbleVolatileRepositoryTest BubblePersistentRepositoryTest BubblesTest Bug: 173408780 Change-Id: I88cb7cc7ee676d8e0756328a95a54fdaf018a013
* Move bubble setting to secure table & support multiuserMady Mellor2021-04-191-0/+14
| | | | | | | | | | | | | | | | | | * Move bubbles setting from the global table to the secure table, this should be a per-user setting * Update step in SettingsProvider that adds the secure setting based on the value of the previous global, or if the user is managed, it checks if the owner of the managed user has a secure setting & uses the value from that to insert the new setting. * Adds the secure setting to the "cloned to profile" group since it should follow the setting of the profile owner. * PreferencesHelper tracks this value per-user. Bug: 173408780 Test: atest PreferencesHelperTest NotificationManagerServiceTest BubbleExtractorTest Change-Id: I261364890fcc54fb2791e628b41c07aeddde3974
* Merge "Fix issue with callback not being made on the sysui main thread" into ↵Winson Chung2021-04-141-1/+1
|\ | | | | | | sc-dev
| * Fix issue with callback not being made on the sysui main threadWinson Chung2021-04-091-1/+1
| | | | | | | | | | | | Bug: 182705044 Test: atest SystemUITests Change-Id: I83457f75a35e22f6e06c94e18b807ab88f59dd09
* | Add callback of TaskStackChangeListenerTony Huang2021-04-071-4/+7
|/ | | | | | | | | It was missed while migrating to wm-shell, add it back and follow new thread arch. Fix: 182688580 Test: Open link from Bubbles Change-Id: I6c205a376e964ab1aaafaedea6508597ee667e23
* Remove some blocking calls in BubbleManagerWinson Chung2021-02-101-48/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When shell thread is enabled, there's a deadlock that can happen from having blocking calls from both Shell -> SysUI and vice versa. Specifically if you have a scenario like: Shell SysUI A ----------------> f() (shell blocking call, posts onto thread & awaits) | g() <-------------- B (sysui blocking call while f() is posted) | | | V V f() runs g() runs The call f() will never actually run since B came in which is blocked on g() which can't finish because f() has not returned. - Instead, replace some blocking calls with preloaded info (ie. can send bubble entry and whether the the entry should bubble up to onRankingUpdated since it just calls back to query it), and make getShouldRestoredEntries() and getPendingOrActiveEntry() async with a callback. - Can remove isNotificationShadeExpand() since it's not actually used anymore in bubble code Bug: 161979899 Test: atest WMShellUnitTests Test: atest SystemUITests Change-Id: Iba834172c17c3f4b03c23448fef346c71c16c1bb Signed-off-by: Winson Chung <winsonc@google.com>
* 8/ Updating bubbles to run on shell threadWinson Chung2021-01-291-78/+134
| | | | | | | | | | | | - Refactor some code to prevent blocked calls when calling to and from the Bubbles code when it runs on another thread - Ensure that ScrimView can be run in separate windows running on separate threads Bug: 161979899 Test: atest WMShellUnitTests Test: atest SystemUITests Change-Id: I8eca9e9f644486f73a39f21dc37852be51d94539
* When convo is set as important, only bubble if it canMady Mellor2021-01-141-4/+8
| | | | | | | | | | | Previously we called this code regardless of the entry having bubble metadata or not, this is incorrect & had the side effect of collapsing the shade when it shouldn't. Test: manual - mark conversation without bubble metadata as important, note the shade doesn't collapse. Fixes: 177566866 Change-Id: I5eee9ac7bc9b3d2e4abb7ea171d6263007fe68a6
* Migrate Bubbles to wm-shell (5/n)Tony Huang2020-11-041-4/+4
| | | | | | | | | | Move bubbles package and related resources to shell package, also copied some used codes and resources. Bug: 161980186 Test: atest SystemUITests Test: atest WMShellUnitTests Change-Id: Ia108bd4149b3c3bf86631ba1a7a6bce0e76af78f
* Migrate Bubbles to wm-shell (4/n)Tony Huang2020-10-281-0/+725
Move BubbleController sysui dependent code to new class BubblesManager and remove using of Dependency of Bubbles. TODO: Tests still need to be remain on sysui, find suitable method to test both classes independently. Bug: 161980186 Test: atest SystemUITests Change-Id: I7be1dfb81f7ddfb5fc20b180fc5affb7a1d8e93c