Skip to content

Commit d799db4

Browse files
author
Eric Laurent
committed
AudioService: add fix for corrupted settings
Added correction of MODE_RINGER_STREAMS_AFFECTED setting in case it is inconsistent when read from the database: ringtone, notification and system streams are always affected by ringer mode. A corruption of this setting persists accross reboots and propagates via backup/restore causing devices to play notification and ringtones in silent mode. Bug 7384750. Change-Id: I23170413d01e6a8e34ef514f1516d7b9ab8bc656
1 parent 0058f4e commit d799db4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

media/java/android/media/AudioService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,12 @@ private void readPersistedSettings() {
670670
((1 << AudioSystem.STREAM_RING)|(1 << AudioSystem.STREAM_NOTIFICATION)|
671671
(1 << AudioSystem.STREAM_SYSTEM)|(1 << AudioSystem.STREAM_SYSTEM_ENFORCED)),
672672
UserHandle.USER_CURRENT);
673+
674+
// ringtone, notification and system streams are always affected by ringer mode
675+
mRingerModeAffectedStreams |= (1 << AudioSystem.STREAM_RING)|
676+
(1 << AudioSystem.STREAM_NOTIFICATION)|
677+
(1 << AudioSystem.STREAM_SYSTEM);
678+
673679
if (mVoiceCapable) {
674680
mRingerModeAffectedStreams &= ~(1 << AudioSystem.STREAM_MUSIC);
675681
} else {

0 commit comments

Comments
 (0)