Propagate mute event to both ring volume slices

Fix a bug where introduction of a separate_ring_volume slice meant that
the original ring_volume slice would not get notified of ring stream
muting event.

Bug: b/266855922

Test: make DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER=VolumeSliceHelperTest RunSettingsRoboTests -j40
Change-Id: Ifb5ebe4e7d9bde3d14336891cce3fbee167a5911
This commit is contained in:
Behnam Heydarshahi
2023-02-08 17:30:25 +00:00
parent 3773ae0d9f
commit 236bbcb8bc
2 changed files with 43 additions and 1 deletions

View File

@@ -115,7 +115,9 @@ public class VolumeSliceHelper {
for (Map.Entry<Uri, Integer> entry : sRegisteredUri.entrySet()) {
if (entry.getValue() == inputType) {
context.getContentResolver().notifyChange(entry.getKey(), null /* observer */);
break;
if (inputType != AudioManager.STREAM_RING) { // Two URIs are mapped to ring
break;
}
}
}
}