Skip to content

Commit 8ca9a1c

Browse files
author
Eric Laurent
committed
Fix volume indication in vibrate mode.
The latest change in silent/vibrate mode selection via volume keys was such that ringtone volume was not showing 0 when entering vibrate mode by continuous press on vol down. Issue 5530217. Change-Id: I9ba817648e5dca40e0d19f5f606d7763ae61b1c6
1 parent 69e640e commit 8ca9a1c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

media/java/android/media/AudioService.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,8 +1635,10 @@ private boolean checkForRingerModeChange(int oldIndex, int direction, int stream
16351635
// "silent mode", but which one?
16361636
newRingerMode = vibeInSilent ? RINGER_MODE_VIBRATE : RINGER_MODE_SILENT;
16371637
}
1638-
if (uiIndex == 0 || (mPrevVolDirection == AudioManager.ADJUST_LOWER &&
1639-
mVoiceCapable && streamType == AudioSystem.STREAM_RING)) {
1638+
if (uiIndex == 0 ||
1639+
(!vibeInSilent &&
1640+
mPrevVolDirection == AudioManager.ADJUST_LOWER &&
1641+
mVoiceCapable && streamType == AudioSystem.STREAM_RING)) {
16401642
adjustVolumeIndex = false;
16411643
}
16421644
}

0 commit comments

Comments
 (0)