From e506c85eaa0b81359b6472825bec038750fae6d7 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Wed, 26 Nov 2014 10:11:19 -0500 Subject: Volume: Avoid making bad forceVolumeControlStream call. Ensure we don't call audio manager with STREAM_MASTER, which is a pseudo-stream value internal to volume panel. Bug: 18250921 Change-Id: I4b6af9fc60d7683e9103be52cc937c33c1c15e31 --- packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/SystemUI/src/com') diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java index 1fe4698..aaf5d5f 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java @@ -1178,7 +1178,9 @@ public class VolumePanel extends Handler implements DemoMode { if (!isShowing()) { int stream = (streamType == STREAM_REMOTE_MUSIC) ? -1 : streamType; // when the stream is for remote playback, use -1 to reset the stream type evaluation - mAudioManager.forceVolumeControlStream(stream); + if (stream != STREAM_MASTER) { + mAudioManager.forceVolumeControlStream(stream); + } mDialog.show(); if (mCallback != null) { mCallback.onVisible(true); -- cgit v1.1