summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-13.0.0_r52' of ↵George Zacharia2023-08-021-4/+7
|\ | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 Release 52 (TQ3A.230605.012) Change-Id: Ic80f318636f1f70bbd009504352ddde511d0dead
| * [DO NOT MERGE] Replace UserHandle.CURRENT with UserTrackerAlex Stetson2023-01-171-2/+5
| | | | | | | | | | | | Bug: 249831072 Test: atest SystemUITests Change-Id: Id98ed38495feaab4780452ded14fe24b68ae6944
* | base: Add switch to unlink ringtone and notifications volume [1/2]Pranav Vashi2023-05-051-1/+20
| | | | | | | | | | | | | | | | | | | | | | * Make use of AOSP config to set default initial value Ref: https://github.com/crdroidandroid/android_frameworks_base/commit/345ff7b8618bd57f6c6ccbf875cf860338deb513 https://github.com/crdroidandroid/android_frameworks_base/commit/ab1aad9aa76391d675ca38a93f23120032c1d957 Change-Id: Ib0adde055d91527a57b203cb488bce6f62974322 Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
* | Merge tag 'android-13.0.0_r35' of ↵George Zacharia2023-04-031-2/+9
|\| | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into t13.0 Android 13.0.0 release 35 Change-Id: I709958b2f015d1774b2ece25894467c3a279f93c
| * [LE Audio] Add BT LE headset check for voice call to update the iconchangbetty2022-12-011-0/+5
| | | | | | | | | | | | | | | | bug: 240506858 Test: manual test Test: atest VolumeDialogControllerImplTest Test: atest VolumeDialogImplTest Change-Id: Id14ccbc7d3b9343f91c2356000229a0af0e9ced3
| * Register VolumeDialogControllerImpl with DumpManager.Alison Cichowlas2022-09-291-2/+4
| | | | | | | | | | | | Bug: 249345341 Test: adb shell dumpsys activity service SystemUI | grep VolumeDialogControllerImpl: (including final colon) has results Change-Id: I4eb92b55e835d78814c62a77408eabfe08f34dbf
* | Revert "frameworks: Add unlinked ringtone and notification volumes"Michael Bestas2023-03-261-17/+0
| | | | | | | | | | | | | | | | Conflicts with QPR2 implementation This reverts commit 35ccfd76968a9e55fe46987e896c41831055285c. Change-Id: I3bdcb7d9ca0fbf4e8fdb996b64669c98943578f4
* | [1/2] SystemUI: Introduce Adaptive PlaybackJyotiraditya2022-10-261-0/+35
| | | | | | | | | | | | | | Automatically pause media when muted. Resume if unmuted within a minute. Co-Authored-By: Stylogey <stylogey@gmail.com> Change-Id: I5d37478b3739309dcaae4eb6a0e4aac6c87f120f
* | base: Live Volume Steps [1/2]Meticulus2022-10-261-0/+3
| | | | | | | | Change-Id: Ia803a6ef38e5e89e1af9a31e7904d77ec1f16722
* | frameworks: Add unlinked ringtone and notification volumesAdnan Begovic2022-10-261-0/+17
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port over linked volumes from 12.1 Implement linked volumes and add upgrade path. Change-Id: Ibbeff656fcaaa4a2ff79de530b48b216df271b21 frameworks: read VOLUME_LINK_NOTIFICATION from proper table Change-Id: I15e9caa18f307a51a732c7a59013bbbb234a7477 Signed-off-by: Roman Birg <roman@cyngn.com> (cherry picked from commit 1b7cfa1716017e0d03c9693428c21d8e11c5dc0a) fix Notification volume slider linking Change-Id: I0f74485f5c8c2aa7698cf9ba1c60c2c8c967798d Signed-off-by: Roman Birg <roman@cyngn.com> Improve SeekBarVolumizer behavior with unlinked streams - Fix notification stream enabling at 0 volume - Fix the notification slider being set when moving ringer stream Change-Id: If3705cc833c07f726f8ad7b1ec79a42e86e8ff22 Signed-off-by: Roman Birg <roman@cyngn.com> base: Fix notification sounds for wifi only devices The linking of voice & notification doesn't take into account the fact that a device may not actually have voice capabilities. Whenever checking whether or not to link notification and ring volumes, also verify that the device really is voice capable. Change-Id: Iae49302d3b5934d36b182e289e4975f5dd85b834 frameworks: fix setting up linked notification stream on boot updateStreamVolumeAlias() was previously responsible for checking the linked notification variable and mapping the notification stream, but the setting to read whether the notifications were linked was read in after that method had run which was responsible for linking them. Extract the logic and re-run it again after reading the persisted settings. Change-Id: Ia62bf3ca072def54ec6ebf4f9e865d9c913e3bc4 Signed-off-by: Roman Birg <roman@cyngn.com> fixup volume stream linking - Make the SeekBarVolumizer move notification and ringer streams when linked and moving ringer. - Fix initial state causing volume stream seek bar to be set to 0 initially - Clean up AudioService initialization code Change-Id: Ia11a7a392e5eb3ef862147843e365d5f20eaf90a Signed-off-by: Roman Birg <roman@cyngn.com> SystemUI: Fix volume panel inconsistencies * Use xml drawables everywhere * Add muted notification icon * Use AOSP naming scheme for drawables Change-Id: I14a3af9a7aecf4828f81a8e39855608e452848d6 Misc fixes Change-Id: Ia94b0a6655e52f5949f031360f525c871cd8df14 Signed-off-by: Meninblack007 <sanyam.53jain@gmail.com> Use STREAM_RING on non-voice capable devices * That's what Google does. Change-Id: Iac88d161eb1dccbbb5c538d5e04d8d1fc43edef2 (cherry picked from commit 981e89eb6b99c058a9b3bf533e6494ab44a4b241) VolumeDialog: Fix mismerge Fixes not disappearing cast pickers * Commit 568585b introduced a new LinearLayout for the volume rows * Remove unused booleans Change-Id: I0660d10872cc1098fdd67b618a20ea0f8e926e68 Fix VOLUME_LINK_NOTIFICATION javadoc * Fixes checkapi: frameworks/base/core/java/android/provider/Settings.java:8920: error: Added field android.provider.Settings.Secure.VOLUME_LINK_NOTIFICATION [AddedField] Change-Id: I4da34de53ce23e90d5f2eff72ef0a15034f08ec1 Change-Id: I7695aa15bc85e8ff19747ba7cd6700e190c7d988
* Move Volume control Binder calls to worker threadJustin Weir2022-05-161-36/+31
| | | | | | | | | Pushed the binder calls down the call stack to where it's on the worker thread instead of the main thread. Bug: 226354720 Test: Ran all the tests and verified that Binder calls are on worker threads Change-Id: I05c89b5057529a492b0e33a9198d1207609245da
* 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
* Clean up captions service checksNadav Bar2022-03-131-36/+2
| | | | | | | | | | | This CL finish the migration to the new CaptioningManager API. As part of the cleanup the captions service config is also removed, and the PackageManager implementation is updated to take the captions package name from the remaining config value which is stil in use. Change-Id: Icba274c904c58f62c1036deac936114b7deb8553 Bug: 220968335. Test: Manually.
* Merge "Correct volume control symbol for BLE" am: 200dfd387f am: 50987acb5b ↵Treehugger Robot2022-03-031-1/+5
|\ | | | | | | | | | | | | | | am: 75e156e2c5 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1990331 Change-Id: I8e1107220e72c25510947a7c570a206e52abdbe0
| * Correct volume control symbol for BLEHyundo Moon2022-02-181-2/+5
| | | | | | | | | | | | Bug: 204404173 Test: Connected BLE headset and checked volume slider Change-Id: If79edd7a0ef74659a917aba11ba70081f50b87fb
| * Tweak volume adjustment rulesOliver Woodman2021-11-241-12/+46
| | | | | | | | | | | | | | | | | | | | Test: manual Bug: 197586676 Bug: 202500642 Merged-In: If531a23f5e7b242d3d637966b74b67acfd303199 Change-Id: If531a23f5e7b242d3d637966b74b67acfd303199 (cherry picked from commit 022081595bf4a082f8354b852eae6d5a015be3fe) Merged-In:If531a23f5e7b242d3d637966b74b67acfd303199
* | Integrate captions volume button with new CaptioningManager APINadav Bar2022-02-231-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | The code that checks for the captions service component will be removed once the integration in the system captions side will happen. Also cleans up the unused stream opt-out property. Change-Id: I606f0d7a5319bbdc54b2e853fb70ea44ff9645a0 Bug: 221021539. Bug: 136282740. Test: Manually.
* | Make all Vibrator calls asyncLucas Dupin2022-01-271-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Vibrator has some serious performance issues, this API cannot be called from the UI thread in its current state. Test: atest UdfpsControllerTest Test: atest ControlActionCoordinatorImplTest Test: atest LockIconViewControllerTest Test: atest VolumeDialogControllerImplTest Test: atest VibratorHelperTest Test: atest GlobalActionsDialogLiteTest Fixes: 190488502 Change-Id: Ice6c6a6749b6889540199af0eaf5a85d3e7e1e5f
* | Tweak volume adjustment rules am: aa9dc925f8 am: e49fa1c0beOliver Woodman2021-11-101-12/+46
|\ \ | | | | | | | | | | | | | | | Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16214371 Change-Id: Idf45273d3b7308bea1a0222693128333e73a6874
| * | Tweak volume adjustment rulesOliver Woodman2021-11-091-12/+46
| |/ | | | | | | | | | | | | Test: manual Bug: 197586676 Bug: 202500642 Change-Id: If531a23f5e7b242d3d637966b74b67acfd303199
* / Changed user check for play sound effect APIOscar Azucena2021-11-061-1/+2
|/ | | | | | | | | | | | | | | | | | Changed the way the user is checked for audio manager play sound effect API. Instead of capturing the process user, the current user is used to determined if the audio should be played. Also moved the should sound play check to audio service, as the check requires interact across users permission, instead of adding permission to the API this can be faciliated in the audio service. Bug: 165038414 Test: atest AudioManagerTest#testSoundEffects Test: atest AudioManagerTest# testCheckingZenModeBlockDoesNotRequireNotificationPolicyAccess Test: atest VolumeDialogControllerImplTest Test: manually disable audio effect sounds settings and play audio NoNonSdkCheck: IAudioService#playSoundEffect is internal API Change-Id: Ib0e3001fd76e3a5fdd831551d16f091029d03422
* Merge "Add flag for remote streams" into sc-devJulia Reynolds2021-06-241-58/+74
|\
| * Add flag for remote streamsJulia Reynolds2021-06-171-58/+74
| | | | | | | | | | | | Test: manual, with remote stream active Bug: 191356254 Change-Id: I59947b8d04ba717eac0e5a501965de97d200cc9c
* | WakefulenessLifecycle: start out as AWAKE for NFFsRobin Lee2021-06-171-1/+1
|/ | | | | | | | | | | | | | | WakefulessLifecycle is driven by KeyguardService, which doesn't always exist. When it doesn't exist, mWakefulness will remain set to WAKEFULNESS_ASLEEP, which prevents some UI bits from showing up. The most important one to fix is VolumeDialogControllerImpl. We also need to set the default value of mDeviceInteractive to true since the callback will never come on a device without a keyguard service. Test: atest SystemUITests Fix: 190357428 Change-Id: Ib4f67e756c9549d919ec8ae640abca044d7d651f
* Break VolumeDialogControllerImpl' dependency on StatusBarDave Mankoff2021-05-251-66/+58
| | | | | | | | | | | | | | VolumeDialogControllerImpl had a reference to a lazy StatusBar. Because of how it was used, this could result in trying to stand up StatusBar (and all of its dependencies) on a non-main thread, which they did not appreciate. This removes the dependency on StatusBar, and throws in a healthy dash of dependency injection while we're at it. Fixes: 189203821 Test: atest SystemUITests && manual Change-Id: I41e00438b30928815e9355162af05f926f24dfce
* Merge "Use a concurrent hash map to access VolumeDialogControllerImpl's ↵Treehugger Robot2020-09-111-1/+2
|\ | | | | | | | | | | | | | | callbacks" am: ce7d32096e am: 333fdf8c59 am: 19797c2dd6 am: 3f0535c610 am: e805a77383 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1247026 Change-Id: I1b868fed6f3b46e95d737f349d8476aea5804041
| * Use a concurrent hash map to access VolumeDialogControllerImpl's callbacksJeff Blattman2020-09-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue is that the VolumeDialogControllerImpl.C's mCallbackMap is accessed from two different threads. Instrumentation shows that via add() and remove() it is modified on the main thread, and methods like C.onConfigurationChanged() are called from VolumeDialogControllerImpl.Receiver, which registers with on a handler tied to a background thread (VolumeDialogControllerImpl.W/mWorker). C.onConfigurationChanged() is called directly from that thread. Use a concurrent hash map in place of hash map to avoid the concurrent modification exception. Test: manual. Ensure device boots. Ensure basic volume control functions. Ensure a configuration change (via locale change) does not result in any crash. Bug: https://issuetracker.google.com/issues/150402778 Change-Id: I26bb8533c30d57e48f500e6863d0f522e1559567
* | 6/N Move everything into SysUIComponent.Dave Mankoff2020-08-161-2/+2
|/ | | | | | | | | | | | | | | It is far easier to move _everything_ into SysUIComponent, and then selectively promote things back to GlobalScope and/or WMScope than it is to try to do it one at a time. With this change, though lots of files are touched, very little actually changes structurally. After this change goes in, folks should stop using @Singleton quite so freely. Most things should live in @SysuiSingleton. @Singleton is due to quickly be replaced by @GlobalScope. Bug: 162923491 Test: atest SystemUITests && manual Change-Id: Idc31d3d83b030581fb1fa869f7fafc4f2d3a8828
* Added RingModeTrackerFabian Kozynski2020-04-091-17/+88
| | | | | | | | | | | | | | | | | This removes the dependency on re-delivery of sticky broadcasts by having a single point in the system that listens to RINGER_MODE_CHANGED_ACTION and RINGER_MODE_INTERNAL_CHANGED_ACTION. Also, added some global mocks for Notification tests that were constructing KeyguardUpdateMonitor (after many injections). Also, added mock in KeyguardSecurityContainerTest. Test: manual Test: atest SystemUITests Bug: 151641451 Change-Id: Ie81109cf1fe077bc4790f7a4e501df69dbb2323b
* Workaround for not initializing StatusBar on TVsSergey Nikolaienkov2020-03-031-1/+6
| | | | | | | | | | | | | | The fact that StatusBar gets initialized and injected on TVs is causing several issues. While we are working on the permanent solution - unbinding StatusBar on TVs (bug: 150666950) Change-Id: I123685dbb49aa6df95f32faeefca9c13123ec527 Test: make, flash, make sure HDMI-CEC is disabled, use +/- buttons on a remote to adjust volume, see the appropriate UI Bug: 150663447 Bug: 146188087 Change-Id: Ifa5ba67db1bdaf6b6ae1f685989e4cd47fa1ac18
* BroadcastDispatcher can use Executors nowFabian Kozynski2020-01-091-1/+1
| | | | | | | | registerReceiver takes an optional Executor parameter. The old registerReceiver that takes a Handler has been renamed and @Deprecated Test: SystemUITests Change-Id: I43b97f720b2b153d1019ed3cf19e1533558e380f
* De-contextify volume/Events MetricsLogger calls.Will Brockman2019-12-021-13/+13
| | | | | | | | | | | | A small cleanup - replace calls to MetricsLogger's deprecated static methods with calls to the member functions of the logger instance that the code was already constructing. This makes the Context argument of Events.writeEvent() unnecessary, so removed that as well. Test: atest SystemUITests Test: mp droid + manually verify MetricsLogger logging. Change-Id: I8ca380ca56f51c414c17858dfd5b932ba02d4df0
* Add some temporary logging about remote volumesJulia Reynolds2019-11-131-4/+8
| | | | | | | | | | We are occasionally showing incorrect UI for remote volumes; add some temporary logging to narrow down where the problem is. Test: manual Bug: 138442574 Change-Id: Id70161a5c27e778bb61ba640c4c84ece25017fab
* Remove circular depdendency in VolumdDialogControllerImpl.Dave Mankoff2019-11-111-9/+13
| | | | | | | | This was affecting CarSystemUI. Bug: 144289426 Test: atest SystemUITests Change-Id: I9c3b682dd8b68f458a515b173ec52b81c81a1d1b
* Remove all calls to getComponent(StatusBar.class)Dave Mankoff2019-11-111-18/+12
| | | | | | Bug: 143224715 Test: atest SystemUITests && manual Change-Id: I349836eed9c1e988205681b93f86e967156f90a9
* Ringer toggle always affects system soundsBeverly2019-09-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | Background: - When DND is on, users can allow "touch sounds" (system sounds) to bypass DND - The user-visible ringer stream and toggle controls notification, ringer, and system sounds Previously, allowing system sounds to bypass DND overrode the ringer from affecting the system sound stream which made the volume functionality of touch sounds different from in/out of DND. This fix ensures that DND always respects the fact that the ringer toggle and stream controls notifications, ringer, and system sounds at all times (whether in/out of DND). Test: atest ZenModeHelperTest Test: atest ZenModeConfigTest Test: atest AudioManagerTest Test: atest AudioManagerTest#testPriorityOnlySystemDisallowedWithRingerMuted Test: atest AudioManagerTest#testPriorityOnlySystemAllowed Fixes: 141292611 Change-Id: I6e36097f18a93ce554b3fad7e1a2bd1057ac9e1d
* Convert all SCREEN_OFF receivers to BroadcastDispatcherFabian Kozynski2019-09-251-3/+6
| | | | | | | | | | | | | | | | | | | All broadcast receivers that filter for ACTION_SCREEN_OFF have been converted to register with BroadcastDispatcher instead of Context. In many cases this involves other Intents being covered by BroadcastDispatcher. Additionally, UserBroadcastDispatcher propagates the PendingResult so the individual receivers can access it (mostly to query getSendingUser). Test: enable logging of BroadcastQueue for ACTION_SCREEN_OFF only shows 2 receivers (user 0 and user -1) Test: Dump of BroadcastDispatcher shows all the classes registered to it Test: enable logging of UserBroadcastDispatcher Test: atest PowerUITest StatusBarTest VolumeDialogControllerImplTest SystemUIDialogTest NavigationBarFragmentTest Bug: 134566046 Change-Id: I0caa2a6b53f3f6b360bf2e8598dde29c45f1d4e3
* Merge "Use per user method when writing or reading Live Caption secure ↵Nadav Bar2019-07-291-4/+5
|\ | | | | | | | | | | | | | | setting" into qt-r1-dev am: 5191f05791 am: e1fc69e125 am: 603cf82011 Change-Id: I8092d110d6358758c7c00f55e4848f7a2caca658
| * Use per user method when writing or reading Live Caption secure settingNadav Bar2019-07-281-4/+5
| | | | | | | | | | | | Change-Id: Ib86af1a84f0791b8779dae96afd948eabbcf770e Bug: 138493870. Test: Manually.
* | Fix crash on dump()Julia Reynolds2019-07-021-17/+33
|/ | | | | | Test: use device, dump systemui Fixes: 132164528 Change-Id: Ie305fa91a011340e2634b1e05aa98b4eec6ea753
* Remove OPTED_OUT Secure Setting based on API Council feedback.Anthony Tripaldi2019-04-081-3/+2
| | | | | | Bug:129768185 Test: manual Change-Id: I51d47142cfb2abeb17d6ad5e99b8f7d1ea585fc7
* Add a new Secure Setting check for current opted-out state of captions.Anthony Tripaldi2019-03-221-0/+7
| | | | | | Bug:129066127 Test: manual Change-Id: I511f5fdb140480ca49e340386d11510f69a5ef31
* Add tool tip view for first run of volume dialog to notify users of odiAnthony Tripaldi2019-03-211-10/+13
| | | | | | | | captions functionality. Bug:128970574 Change-Id: I4710fd1d84f4116e003c14720a2ce55c5b3ff899 Test: manual
* Adding the on-device captions service toggle into the volume rocker.Anthony Tripaldi2019-03-111-1/+60
| | | | | | Change-Id: Iec78b07a7df0c22f7f505cab7910315b7ea07d6b Bug: 126956988 Test: manually
* Move MediaSessions from systemui to settingslibjackqdyulei2019-02-271-0/+1
| | | | | | | | Also add javadocs to pass style check Bug: 126199571 Test: Build Change-Id: I78389834760e12fb73b0ae1c8565b8c5d42a5789
* Merge "Users can change zen policy for system dnd rules"TreeHugger Robot2018-12-211-1/+2
|\
| * Users can change zen policy for system dnd rulesBeverly2018-12-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | - Check consolidated zen policy in volume dialog, seek bar volumizer and ZenModeControllerImpl instead of default notification policy - Save ZenPolicy changes on restore Test: atest ZenModeHelperTest Test: atest ZenModeControllerImplTest Bug: 111475013 Change-Id: I43b6dc8c6453739c50c874fe37415d425223d8c4
* | Clean up DependencyProvider a bitJason Monk2018-12-211-0/+5
|/ | | | | | | | | Create DependencyBinder which is abstract and can tell dagger how to convert directly between interfaces and implementations without requiring code for it. Test: compile (which runs dagger) Change-Id: I7013ee12d37172441e2c70cf2fe36f707975c821
* Fixed volume logging on sticky broadcastsAlastair Breeze2018-10-171-0/+2
| | | | | | | | Ringer mode changed is a sticky broadcast and is currently being logged on broadcast attach for normal and vibrate state (not silent). This change instead uses the sticky broadcast to initialise the current state rather than logging. Test: manual Change-Id: I09e91ec4b71fbbbfae71d188d9c858675a7e774d Fixes: 117315582
* Revert "When ringer changes to vibrate, phone vibrates"Beverly Tai2018-05-151-22/+3
| | | | | | | | | | | Fixes: 79773317 Bug: 78665512 This reverts commit d253f98c0e2357307e5ae352d26e077ed7259b9b. Reason for revert: b/79773317 Change-Id: I6f3eebd64b94436748986422906006686351cc4b