Volume: Don't allow ringer volume of 0 exiting ringer mode.

For any device with vibration, not only voice-capable devices.

Bug: 18423530
Change-Id: I0f1a7df884d675e6bc6854dcf044426c07f3d2f7
This commit is contained in:
John Spurlock
2014-11-18 10:51:39 -05:00
parent b3ec64e100
commit 95ef08b348

View File

@@ -1827,8 +1827,8 @@ public class AudioService extends IAudioService.Stub {
if (!isStreamAffectedByRingerMode(streamType) ||
ringerMode == AudioManager.RINGER_MODE_NORMAL) {
// ring and notifications volume should never be 0 when not silenced
// on voice capable devices
if (isPlatformVoice() &&
// on voice capable devices or devices that support vibration
if ((isPlatformVoice() || mHasVibrator) &&
mStreamVolumeAlias[streamType] == AudioSystem.STREAM_RING) {
synchronized (VolumeStreamState.class) {
Set set = mStreamStates[streamType].mIndex.entrySet();