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

Commit cc11b1b8 authored by Eric Laurent's avatar Eric Laurent
Browse files

Fix issue 5126270: Holding volume down vibrates

Clear AudioManager.FLAG_VIBRATE in adjustStreamVolume() if
already in silent mode.

Change-Id: I8035a8cc713e1880799d9aaf053d8e4d12acad75
parent 99f09c27
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -516,6 +516,10 @@ public class AudioService extends IAudioService.Stub {
             (!mVoiceCapable && streamType != AudioSystem.STREAM_VOICE_CALL &&
               streamType != AudioSystem.STREAM_BLUETOOTH_SCO) ||
                (mVoiceCapable && streamType == AudioSystem.STREAM_RING)) {
            //  do not vibrate if already in silent mode
            if (mRingerMode != AudioManager.RINGER_MODE_NORMAL) {
                flags &= ~AudioManager.FLAG_VIBRATE;
            }
            // Check if the ringer mode changes with this volume adjustment. If
            // it does, it will handle adjusting the volume, so we won't below
            adjustVolume = checkForRingerModeChange(oldIndex, direction);