diff options
author | Eric Laurent <elaurent@google.com> | 2012-10-23 20:14:27 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2012-10-23 20:14:27 -0700 |
commit | d799db406b0bace285b7a82a468f75887f0308b6 (patch) | |
tree | bcb1a912addc3e05ece4a817734206db23bc338b /media/java | |
parent | 0058f4ed50e5b4bfc8361c18b87115160d7132bb (diff) | |
download | frameworks_base-d799db406b0bace285b7a82a468f75887f0308b6.zip frameworks_base-d799db406b0bace285b7a82a468f75887f0308b6.tar.gz frameworks_base-d799db406b0bace285b7a82a468f75887f0308b6.tar.bz2 |
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
Diffstat (limited to 'media/java')
-rw-r--r-- | media/java/android/media/AudioService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index dd320a0..aa0d8c3 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -670,6 +670,12 @@ public class AudioService extends IAudioService.Stub implements OnFinished { ((1 << AudioSystem.STREAM_RING)|(1 << AudioSystem.STREAM_NOTIFICATION)| (1 << AudioSystem.STREAM_SYSTEM)|(1 << AudioSystem.STREAM_SYSTEM_ENFORCED)), UserHandle.USER_CURRENT); + + // ringtone, notification and system streams are always affected by ringer mode + mRingerModeAffectedStreams |= (1 << AudioSystem.STREAM_RING)| + (1 << AudioSystem.STREAM_NOTIFICATION)| + (1 << AudioSystem.STREAM_SYSTEM); + if (mVoiceCapable) { mRingerModeAffectedStreams &= ~(1 << AudioSystem.STREAM_MUSIC); } else { |