The problem happens only if volume down key is pressed while
already in silent or vibrate mode. In this case, AudioService accepts
changing the last audible index for ringer volume from 1 to 0.
When volume up is pressed, current ringer volume value is restored from 0
instead of 1.
The fix consists in keeping last audible index at 1 once in silent of vibrate
mode even is volume down key is pressed.
Change-Id: Id08edd12ce985c22233124545eba2c3e4b8cdc8e
if (direction == AudioManager.ADJUST_RAISE) {
// exiting silent mode
newRingerMode = AudioManager.RINGER_MODE_NORMAL;
+ } else {
+ // prevent last audible index to reach 0
+ adjustVolumeIndex = false;
}
}