diff options
author | RoboErik <epastern@google.com> | 2014-06-26 10:26:43 -0700 |
---|---|---|
committer | Erik Pasternak <roboerik@android.com> | 2014-06-26 18:47:16 +0000 |
commit | e9466805e55595ce72c070c73e2fcae46e857850 (patch) | |
tree | 80e1c63f59243be8ace1bc6ed1642f6dedbd795f /services/core/java/com/android/server/media | |
parent | b992f46fab39b180e55d0054f647993a6180606b (diff) | |
download | frameworks_base-e9466805e55595ce72c070c73e2fcae46e857850.zip frameworks_base-e9466805e55595ce72c070c73e2fcae46e857850.tar.gz frameworks_base-e9466805e55595ce72c070c73e2fcae46e857850.tar.bz2 |
b/15892295 If playback is active don't play a beep
The old code removed the flag for playing a beep when changing volume
with active playback. This will do the same thing.
Change-Id: I708db66a1575d314b941166d4a6ca05d0a796dae
Diffstat (limited to 'services/core/java/com/android/server/media')
-rw-r--r-- | services/core/java/com/android/server/media/MediaSessionRecord.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java index 6f1eb8f..0a07d57 100644 --- a/services/core/java/com/android/server/media/MediaSessionRecord.java +++ b/services/core/java/com/android/server/media/MediaSessionRecord.java @@ -280,6 +280,9 @@ public class MediaSessionRecord implements IBinder.DeathRecipient { * @param delta The amount to adjust the volume by. */ public void adjustVolumeBy(int delta, int flags) { + if (isPlaybackActive(false)) { + flags &= ~AudioManager.FLAG_PLAY_SOUND; + } if (mVolumeType == MediaSession.PLAYBACK_TYPE_LOCAL) { if (delta == 0) { mAudioManager.adjustStreamVolume(mAudioStream, delta, flags); |