summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-13.0.0_r52' of ↵George Zacharia2023-08-021-2/+65
|\ | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 Release 52 (TQ3A.230605.012) Change-Id: Ic80f318636f1f70bbd009504352ddde511d0dead
| * RESTRICT AUTOMERGE Center align the lock screen wallpaperAustin Wang2023-03-271-2/+65
| | | | | | | | | | | | | | | | | | | | | | | | On smaller display of a multi display device the lock screen wallpaper should be showing the center area of the wallpaper. Check the display id to find out which display the lock screen wallpaper is on, the check needs to happened when we are adjusting the bounds to get the new display id. Bug: 263932616 Test: set the lock screen wallpaper and observe the result Change-Id: I32b93084a9e716a06e032f83a8cf625c25d3e5e5
* | Merge tag 'android-13.0.0_r35' of ↵George Zacharia2023-04-031-8/+12
|\| | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 release 35 Change-Id: I709958b2f015d1774b2ece25894467c3a279f93c
| * Organize media control classesBeth Thibodeau2022-10-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move current media control classes under a new package, systemui.media.controls, with sub-packages - models (player and recommendation card types) - pipeline - resume - UI - util Test: build Test: atest com.android.systemui.media Bug: 241485754 Change-Id: I32667f50b1d35f2f807b8d437042a2d5c390e649
| * Removed Dependency.get from com.android.systemui.statusbarShawn Lee2022-09-221-6/+9
| | | | | | | | | | | | | | | | | | | | Replacing uses of Dependency.get as it is deprecated. Deleted NonPhoneDependencyTest as it has been disabled since this CL: ag/12474869 Bug: 218352036 Test: atest NotificationLockscreenUserManagerTest Change-Id: Ifd7489a4084cf36331ab68c597be09e25572ce5b Merged-In: Ifd7489a4084cf36331ab68c597be09e25572ce5b
* | Merge tag 'android-13.0.0_r16' into t13.0George Zacharia2022-12-151-121/+8
|\| | | | | | | | | | | | | | | | | | | | | Android 13.0.0 Release 16 (TQ1A.221205.011) Also included the following reverts: 1. Revert "fw/b: Import Wi-Fi standard icon [1/2]" 2. Revert "Add preference for toggling the wallpaper zooming animation" Co-authored-by: Semavi Ulusoy <doc.divxm@gmail.com> Change-Id: I9a6b51e452c28d10411712c59778bb54da5783e9
| * Inline notif pipeline flag into NotifMediaManagerSteve Elliott2022-06-301-121/+8
| | | | | | | | | | | | | | | | | | 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: I7b115388eed1aee0a78849ba68f787d2fc9e2707
* | Add Lockscreen album art filter [1/2]ElDainosor2022-10-261-4/+42
| | | | | | | | | | | | | | | | | | | | @neobuddy89: Improvised and adapted for Android 10 and Android 11/12. @semdoc: added back backup validators Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Signed-off-by: Semavi Ulusoy <doc.divxm@gmail.com> Change-Id: I2c1caf98c9110105b1c45f8aa0bbdf06be7a816a
* | SystemUI: Allow to enable Lockscreen Media Artbeanstown1062022-10-261-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a squash of the following commits: Author: beanstown106 <nbenis106@gmail.com> Date: Fri Oct 23 21:07:35 2015 -0400 SystemUI: Allow to enable Lockscreen Media Art Change-Id: Id93e115649df5d6dc680101a8c852644b217c28a Author: Ezio Lacandia Bijelkic <brabus84@gmail.com> Date: Fri Nov 20 00:41:04 2020 +0200 SystemUI: Hide lockscreen media art if media is not playing it's annoying to get the artwork even if the notification gets swiped out and media is paused, because the media session is still alive Change-Id: Ie65932127e47c463ef9a8b763298fc4dae20f8ae Change-Id: Idd3033b52b4aa1cf07eb694ea0c9c1c934248f7c
* | [1/2] base: configure lock screen media artwork blur levelMarko Man2022-10-261-1/+10
|/ | | | Change-Id: I68895ae6a471bbc99b538b85337e15e8793665ce
* Remove MODE_UNLOCK_FADING since it's no longer neededBeverly2022-05-161-3/+1
| | | | | | | | | | | Unlock fading was to make face auth feel faster which is no longer necessary. Test: manually test (reach from AoD / pulsing notif from AoD) Test: atest SystemUITests Bug: 232539318 Fixes: 230411303 Change-Id: I5788c31f9b5216932ad86de5fcde9560cf9c65dd
* Make notification getParcelable usages saferJulia Reynolds2022-04-151-2/+2
| | | | | | Test: SystemUITests, CtsAppTestCases Fixes: 198825327 Change-Id: I7a4868a56bc2c9a69d2fb1eae5d53faa3c9dede0
* Merge "Remove FileDescriptor from systemui.Dumpable." into tm-devDave Mankoff2022-04-071-2/+1
|\
| * 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
* | Spinner drawable for casting intermediate stateHawkwood Glazier2022-04-041-2/+14
|/ | | | | | Fixes: 224771457 Test: Manual & new automated Change-Id: I08807e98977cc642621efd20b2200ce48cfdfd4c
* Add the logging logic to distinguish the SS-reactivated resume media and ↵Cecilia2022-04-021-6/+4
| | | | | | | | | user-activated one when there is no recommendation card. Fixes: 213379423 Test: atest com.android.systemui.media Change-Id: Ic5164ef5372654be9a049085aeea7ed559f3edd4 (cherry picked from commit 816553f62b8a16ae7efaeb619a59fa67d5fb7491)
* [Status Bar] Re-name StatusBar.java -> CentralSurfaces.java.Caitlin Cassidy2022-02-281-11/+12
| | | | | | | | | | | 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
* Fix crash when no media present.Jeff DeCew2021-12-281-0/+1
| | | | | | | | Also improves annotations in order to make this less likely in the future. Fixes: 212434516 Test: launch phone with new pipeline, no media. Change-Id: Iab616b0a03c9a06cef55dc85e03faae7ab0f10fc
* Merge "Fix Smartspace media logging bugs" into sc-v2-dev am: 60b5873b70 am: ↵Jieru Shi2021-12-011-4/+6
|\ | | | | | | | | | | | | | | 3e76eb37e1 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16232870 Change-Id: Icbcec41f16a8f0c170d69954d509a594d766e971
| * Fix Smartspace media logging bugsJieru Shi2021-11-301-4/+6
| | | | | | | | | | | | | | | | | | | | | | 1. Log media card received event for both LS and SHADE 2. Log dismiss event for all impressed media card 3. Fix latency logging for media card 4. Fix instance id for media resume card Bug: 202552118 Test: manual, https://paste.googleplex.com/4995063781261312 Change-Id: Ie47db39a5aaae79a3a6c60b109877e4caebcf9ea
* | Merge "Check media session token type" into sc-v2-dev am: 313b9e923d am: ↵Beth Thibodeau2021-11-191-1/+2
|\| | | | | | | | | | | | | | | f784affa98 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16250175 Change-Id: I7a6397d336f1779d8975b0b1ed0e20d904a81453
| * Merge "Check media session token type" into sc-v2-devBeth Thibodeau2021-11-181-1/+2
| |\
| | * Check media session token typeBeth Thibodeau2021-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking whether a notification has a media session, make sure that the value in the extra is the correct type. In addition, moves this check inside of Notification#isMediaNotification for consistency - existing usages either already checked both or will not be impacted, given that valid MediaStyle notifications are now shown in the media carousel instead of with other notifications in the shade. Fixes: 205570941 Test: atest Test: manual, repro case in bug Change-Id: I5d0134d2ce81e9e6a2ed16748f84252bf765a1c9
* | | Inline most FeatureFlags methods.Dave Mankoff2021-11-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | These methods are better off inline. Bug: 203548827 Test: manual Change-Id: I83b4d15d5915696519c94752c446978003b0679e
* | | Merge "NotificationMediaManager now requires modern media notifications" ↵Jeff DeCew2021-11-161-39/+0
|\| | | | | | | | | | | | | | | | | | | | | | | into sc-v2-dev am: 5056199bd2 am: 412d897ff6 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16262626 Change-Id: Iff32ef272927ec07f5b5824e3c3e01c44ff49fab
| * | NotificationMediaManager now requires modern media notificationsJeff DeCew2021-11-151-39/+0
| |/ | | | | | | | | | | | | | | It appears that the false-positives from this session-based matching are causing issues. Fixes: 205638476 Test: manual Change-Id: I9b4b4510c18c3f25e9305e0be44735b094dd8a1f
| * Manually register Dumpables to DumpManagerNed Burns2021-09-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dependency.get() automatically registers its managed objects to the DumpManager if they implement Dumpable. However, if code is refactored that removes all usages of Dependency.get() in favor of Dagger injection, then there is no longer a guarantee that the class in question will be registered to DumpManager (and so included in bug reports). Instead, remove the auto-registration feature of Dependency in favor of manually registering all dumpables with the DumpManager. Bug: 198713580 Test: atest Change-Id: Ie02a44fb7da0b76bf53da874cc9eee030a1b9173 Merged-In: Ie02a44fb7da0b76bf53da874cc9eee030a1b9173
| * Move FeatureFlags to flags package.Dave Mankoff2021-07-301-0/+1
| | | | | | | | | | | | | | Bug: 194781951 Test: compile Change-Id: I851f941487985ddf5aebd0be39e9f8387e50933f Merged-In: I851f941487985ddf5aebd0be39e9f8387e50933f
* | New Pipeline: Add a NotificationVisibilityProvider to support both pipelinesJeff DeCew2021-11-091-17/+6
| | | | | | | | | | | | | | | | Fixes: 169655596 Fixes: 204183781 Fixes: 204770080 Test: atest SystemUITests Change-Id: I96cd96d1a037e7cca301242b1dba25ecdd72be9a
* | Manually register Dumpables to DumpManagerNed Burns2021-09-081-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dependency.get() automatically registers its managed objects to the DumpManager if they implement Dumpable. However, if code is refactored that removes all usages of Dependency.get() in favor of Dagger injection, then there is no longer a guarantee that the class in question will be registered to DumpManager (and so included in bug reports). Instead, remove the auto-registration feature of Dependency in favor of manually registering all dumpables with the DumpManager. Bug: 198713580 Test: atest Change-Id: Ie02a44fb7da0b76bf53da874cc9eee030a1b9173
* | Move FeatureFlags to flags package.Dave Mankoff2021-07-301-0/+1
|/ | | | | | Bug: 194781951 Test: compile Change-Id: I851f941487985ddf5aebd0be39e9f8387e50933f
* Make StatusBar purely optionalTadashi G. Takaoka2021-07-151-4/+6
| | | | | | | | | | | | | | | To be able to inject Optional.empty() to Optional<StatusBar>, this CL - removes raw StatusBar references and replaces it with Optional<StatusBar> - replaces Optional<Lazy<StatusBar>> to Lazy<Optional<StatusBar>> Bug: 144309772 Bug: 138625582 Bug: 187111275 Bug: 187111293 Test: atest SystemUITests Change-Id: I07b63e417dd4cc75a17951619065ba0f234bc2aa Merged-In: I07b63e417dd4cc75a17951619065ba0f234bc2aa
* Media impression logging bug fixJieru Shi2021-06-211-2/+4
| | | | | | | | | | | | | | | | | | 1. Remove redundant LS impressions: Bouncer->LS, Shade LS->LS (User has to visit LS first in order to visit Bouncer and Shade LS) 2. Remove extra impression when user is on second media card, tap to app or turn off screen (previously there will be an impression logged for first media card) 3. Fix logging for resumption media card, previously they were not logged. 4. Fix impression logging for reactivated media card when user connect headphone on QQS, previously they were not logged 5. Use SmallHash to compute instanceid according to b/190640624 6. Remove media resume card logging when Smartspace data is not available Bug: 181364757 Test: manual Change-Id: I6e2e7bc00ecd3f21fefedb2c47315b1e85e5beeb
* On Smartspace removal update, only dismiss media recommendation/playercecilia2021-05-311-8/+7
| | | | | | | | | | | | | | | | | | | | | | when it's invisible to users. 1. Add the param "immediately" to #onMediaDataLoaded and on the underlying Smartspace data's removal; 2. #onSmartspaceMediaDataRemoved should only set "immediately" to true on the user's interaction (e.g. Swipe-to-dismiss); 3. Add #SmartspaceMediaData to preserve the information for a recommendation's view. - This data class is to introduce the field - "isActive", which will be set to false when a) The underlying Smartspace data is removed; b) The Smartspace rec card is dismissed by the user. - This appraoch is used instead of marking the SmartspaceTarget instance to be null: the instance needs to be kept around to block the duplicate Smartspace updates. Fixes: 187219674 Fixes: 185787575 Test: Local builds Change-Id: I19c398fa617749a9e643db33865fd2c5f8f9bdc4
* Always show media recommendation on headphones connection.cecilia2021-05-171-2/+4
| | | | | | | | | | | | | - If all the resumable media age > MAX_AGE, show the media recommendations as the first card. All the existing resumable media remains as is; - Otherwise, reactivate all the resumable media with age <= MAX_AGE to be shown, followed by the media recommendations as the last card. Also, shorten the maximum media age from 3 hours to 30 minutes. Fixes: 187999902 Fixes: 187943295 Test: Local builds Test: MediaDataFilterTest Change-Id: I40bdbb2a172de1c110edfd9a8e3a1f6521438ba3
* Merge changes from topics "animation-lib", "expand-interpolation" into sc-devJordan Demeulenaere2021-04-111-1/+1
|\ | | | | | | | | | | * changes: Tune the expand animation interpolation. (1/2) Move ActivityLaunchAnimator in its own lib. (1/n)
| * Move ActivityLaunchAnimator in its own lib. (1/n)Jordan Demeulenaere2021-04-081-1/+1
| | | | | | | | | | | | Bug: 184121838 Test: Manual Change-Id: Ib979fed2f59d9dbf5f0696edb5fcb4956600e6e0
* | Revert^2 Initial data pipeline for Smartspace media recommendations data in ↵Cecilia Hong2021-04-101-0/+17
|/ | | | | | | | | | | | media carousel. This reverts commit 19672097193db0744a2f827633deba91bda6d969. Reason for revert: Forward fix with removing the bcsmartspace dependency. Test: Tested manually on local builds Bug: 182813345 Change-Id: Icb8cbac4e27abfa9346f9ed0ef6513f6874db556
* Revert "Initial data pipeline for Smartspace media recommendations data in ↵Jack He2021-04-061-17/+0
| | | | | | | | | | | media carousel." This reverts commit 3f4f355af2ab1f6996cf4938c4b15d5d3232b16f. Bug: 184684030 Reason for revert: Break builds Change-Id: Idc67e1eb4d114fd0342444815c0bfbb514523385
* Initial data pipeline for Smartspace media recommendations data in media ↵cecilia2021-04-061-0/+17
| | | | | | | | carousel. Test: Tested manually on local builds Bug: 182813345 Change-Id: I650e2970de3ae94e3ac3cc77f591500c340802ce
* New MediaStyle template:Jeff DeCew2021-03-221-32/+0
| | | | | | | | | | | | | | * Remove all media-specific color extraction and colorization logic * Remove all 'large icon' gradienting logic * Simplify base (headerless) style to use a LinearLayout instead of tweaking margins * Make compact media layout a tweak of the base (headerless) layout * Make big_media layout a tweak of the big_base layout * Fix an unnecessary swooping animation that happened on expand * Ensure RTL layout also works Fixes: 172652345 Test: manual testing w/ updated notify2 Change-Id: I11c1494c0ac32aaf3e9d2010560cc8f1d8c50037
* Replace using integer with UserHandle for user idJin Seok Park2021-01-111-1/+1
| | | | | | | | | | Official API guideline is to use UserHandle for user id to ensure type safety and avoid conflating user IDs with uids. See go/android-api-guidelines#use-userhandle Bug: 174762061 Test: build Change-Id: I1db55e19fe086544f428783898af623422d37a0d
* Media player attempts to dismiss notifications when players removed.Jeff DeCew2020-09-291-0/+67
| | | | | | | | NOTE: this is only a partial fix. See bug for discussion. Bug: 160713608 Test: manual Change-Id: I64db4cc618a812063c18a40ea4465aa4c520a3be
* NotificationMediaManager populates media player when using new pipeline.Jeff DeCew2020-09-291-91/+164
| | | | | Test: manual Change-Id: I25e623c28e991fa907541cb553ba8f9f74e60fe0
* Media - Handle cleanup of pending notification entriesMatt Pietal2020-09-021-2/+18
| | | | | | | | | | | | It is possible for notifications to be canceled prior to inflation, which means there will not be a callback when the notification is removed. Utitlize the NotifCollectionListener to get this event. Fixes: 166315453 Test: manual, using RCNs to generate a race condition as they create/cancel notifications immediately Change-Id: I56d3ab9ef46d86c8623f9bac9152e8a2b8341c01
* Separate UI and StatusBar from BiometricUnlockControllerHeemin Seog2020-08-131-1/+0
| | | | | | | Bug: 162744974 Bug: 155711562 Test: manual, atest SystemUITests, atest :carsysui-presubmit Change-Id: I1a8b6a31e6d965f849d678af0e4c46f236641aac
* Fix issue where player would not be dismissedLucas Dupin2020-06-291-15/+1
| | | | | | | | | | | | A player might try to connect when coming back from a resumable state, but might never finish the operation, beeing stuck on quick settings. From now on, players that are trying to connect will not be considered active anymore. Fixes: 159491565 Test: manual Change-Id: Ib3aa12d5f0566845c7fc9556b5a63dfd95b8defc
* Adding back media resumptionBeth Thibodeau2020-06-041-6/+21
| | | | | | | | | | | Behind a flag for now, while we work on animation issues and settings Enable with: adb shell settings put system qs_media_resumption 1 Bug: 156104922 Fixes: 154823185 Fixes: 156256312 Test: manual; atest com.android.systemui.media Change-Id: I77e3706031da820ea0d49c5dfd17f89ae7fb7db4
* Move media expiration to MediaDataManagerLucas Dupin2020-05-311-42/+0
| | | | | | | | | This way it will be easier to migrate to the new resumption model when it lands. Test: manual Fixes: 157587326 Change-Id: I69ee71d21c96a4c6023156f605387cbe8980e706
* Fix issue where media would not expireLucas Dupin2020-05-211-15/+25
| | | | | | | | | | | | | | We only register media listerners for active streams, and this can be a problem. A stream might arrive not playing yet because it's buffering, and we won't receive any other state notifications about it. Let's register listeners for all media streams that have notifications, regardless of them being already active or not. Test: play/pause song without pulling down the shade, wait for media timeout Test: play/pause song with shade down, wait for timeout Bug: 153897770 Change-Id: I1809f2380bbe2840640baa732360a230904b0c57