Skip to content

Commit 559167f

Browse files
Dianne Hackbornandroid code review
authored andcommitted
Merge "Volume Overlay Bug When swapping streams"
2 parents 30eec83 + fffaf85 commit 559167f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/java/android/view/VolumePanel.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,10 @@ protected void onVolumeChanged(int streamType, int flags) {
400400
if (LOGD) Log.d(TAG, "onVolumeChanged(streamType: " + streamType + ", flags: " + flags + ")");
401401

402402
if ((flags & AudioManager.FLAG_SHOW_UI) != 0) {
403-
if (mActiveStreamType == -1) {
403+
// If the activePanel is none - or - the one we are updating is not the current active panel
404+
// then it is likely that the audio stream being updated has been swapped by an app
405+
// we need to reorder the sliders to bring the new active one to the front
406+
if (mActiveStreamType == -1 || streamType != mActiveStreamType) {
404407
reorderSliders(streamType);
405408
}
406409
onShowVolumeChanged(streamType, flags);

0 commit comments

Comments
 (0)