summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-02-17 18:51:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-02-17 18:51:54 +0000
commitffeee4b5f17be485eff47275220fefcbac758e2c (patch)
tree3e5a6c1119a084e54b27bef10abb2dcf3f66d958
parent8de8627657b0e5b5028c544f1e444f8b1aadfe11 (diff)
parent3ce3725b289dae8ce01ee2e4b43a84424a7c5fbe (diff)
downloadframeworks_base-ffeee4b5f17be485eff47275220fefcbac758e2c.zip
frameworks_base-ffeee4b5f17be485eff47275220fefcbac758e2c.tar.gz
frameworks_base-ffeee4b5f17be485eff47275220fefcbac758e2c.tar.bz2
Merge "Use the unresolved stream type for mute checking."
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index bc3f74a..4ea62ec 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -370,7 +370,8 @@ public class AudioService extends IAudioService.Stub {
// Streams currently muted by ringer mode
private int mRingerModeMutedStreams;
- /** @see System#MUTE_STREAMS_AFFECTED */
+ /** Streams that can be muted. Do not resolve to aliases when checking.
+ * @see System#MUTE_STREAMS_AFFECTED */
private int mMuteAffectedStreams;
/**
@@ -998,15 +999,15 @@ public class AudioService extends IAudioService.Stub {
boolean isMuteAdjust = isMuteAdjust(direction);
+ if (isMuteAdjust && !isStreamAffectedByMute(streamType)) {
+ return;
+ }
+
// use stream type alias here so that streams with same alias have the same behavior,
// including with regard to silent mode control (e.g the use of STREAM_RING below and in
// checkForRingerModeChange() in place of STREAM_RING or STREAM_NOTIFICATION)
int streamTypeAlias = mStreamVolumeAlias[streamType];
- if (isMuteAdjust && !isStreamAffectedByMute(streamTypeAlias)) {
- return;
- }
-
VolumeStreamState streamState = mStreamStates[streamTypeAlias];
final int device = getDeviceForStream(streamTypeAlias);