diff options
author | Eric Laurent <elaurent@google.com> | 2012-10-04 08:44:25 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-04 08:44:26 -0700 |
commit | 31fed73701041cd5455942abe2dacfc7639c5370 (patch) | |
tree | 856fec96a76aca6b1d5e25e3685296b518956a1e | |
parent | 6295ef325102bed3d12e54020acb8728bc2976a0 (diff) | |
parent | 799448bee167c046ed715c7c4e3fe3486bf80d43 (diff) | |
download | frameworks_base-31fed73701041cd5455942abe2dacfc7639c5370.zip frameworks_base-31fed73701041cd5455942abe2dacfc7639c5370.tar.gz frameworks_base-31fed73701041cd5455942abe2dacfc7639c5370.tar.bz2 |
Merge "AudioService: filter flags in volume methods" into jb-mr1-dev
-rw-r--r-- | media/java/android/media/AudioService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index 61418fb..b334bb3 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -733,7 +733,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished { if (streamType == STREAM_REMOTE_MUSIC) { // don't play sounds for remote - flags &= ~AudioManager.FLAG_PLAY_SOUND; + flags &= ~(AudioManager.FLAG_PLAY_SOUND|AudioManager.FLAG_FIXED_VOLUME); //if (DEBUG_VOL) Log.i(TAG, "Need to adjust remote volume: calling adjustRemoteVolume()"); adjustRemoteVolume(AudioSystem.STREAM_MUSIC, direction, flags); } else { @@ -771,6 +771,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished { int index; int oldIndex; + flags &= ~AudioManager.FLAG_FIXED_VOLUME; if ((streamTypeAlias == AudioSystem.STREAM_MUSIC) && ((device & mFixedVolumeDevices) != 0)) { flags |= AudioManager.FLAG_FIXED_VOLUME; @@ -855,6 +856,7 @@ public class AudioService extends IAudioService.Stub implements OnFinished { final int device = getDeviceForStream(streamType); int oldIndex; + flags &= ~AudioManager.FLAG_FIXED_VOLUME; if ((mStreamVolumeAlias[streamType] == AudioSystem.STREAM_MUSIC) && ((device & mFixedVolumeDevices) != 0)) { flags |= AudioManager.FLAG_FIXED_VOLUME; |