Issue 3371080: fix VolumePanel in mute state
VolumePanel must take stream mute state into account before displaying
the update stream volume.
Change-Id: I03a1697c25fca3fa56f892e3d426d00906abeb79
diff --git a/core/java/android/view/VolumePanel.java b/core/java/android/view/VolumePanel.java
index bb5774f..2aa94dc 100644
--- a/core/java/android/view/VolumePanel.java
+++ b/core/java/android/view/VolumePanel.java
@@ -367,7 +367,10 @@
}
protected void onShowVolumeChanged(int streamType, int flags) {
- int index = mAudioService.getStreamVolume(streamType);
+ int index = mAudioService.isStreamMute(streamType) ?
+ mAudioService.getLastAudibleStreamVolume(streamType)
+ : mAudioService.getStreamVolume(streamType);
+
// int message = UNKNOWN_VOLUME_TEXT;
// int additionalMessage = 0;
mRingIsSilent = false;