Muting ring volume slider disables notification

With volume_separate_notification flag enbaled, muting ring volume
slice will cause notification volume slice to gray out.

There used to be a bug in which notification slice would not get
updated in response to a change in ring volume mute/unmute broadcast.
The resulting erroneous behavior was notification slider would get to
zero but not get grayed out. To fix that bug, VolumeSliceHelper listens
to ring stream mute/unmute broadcasts and forwards them to notification
slice.

Bug: b/266072907
Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER="NotificationVolumePreferenceControllerTest|VolumeSliceHelperTest" RunSettingsRoboTests -j40

Change-Id: I2ab51f1272bf99a0c3d9ca285354052d00910c90
This commit is contained in:
Behnam Heydarshahi
2023-01-31 21:04:32 +00:00
parent d89de47399
commit d9c3cf855f
7 changed files with 121 additions and 24 deletions

View File

@@ -86,8 +86,8 @@
android:icon="@drawable/ic_notifications"
android:title="@string/notification_volume_option_title"
android:order="-150"
settings:controller=
"com.android.settings.notification.NotificationVolumePreferenceController"/>
settings:controller="com.android.settings.notification.NotificationVolumePreferenceController"
settings:unavailableSliceSubtitle="@string/notification_volume_disabled_summary"/>
<!-- Alarm volume -->
<com.android.settings.notification.VolumeSeekBarPreference