Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9466805 authored by RoboErik's avatar RoboErik Committed by Erik Pasternak
Browse files

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
parent b992f46f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);