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

Commit 841ed0a0 authored by Sungmin Choi's avatar Sungmin Choi Committed by Jean-Michel Trivi
Browse files

Fix that shutter sound does not play after ringer mode changes to vibrator

Reproduce sequence:

1. Change ring volume to vibration in Settings > Sound & notification
   > Ring volume using touch
2. Launch camera app
3. Capture, but cannot hear shutter sound
4. Even change ringtone to maximum, shutter sound is not played before reboot

Bug: 22589664
Change-Id: I90eb044eaf21f3b558bf050bf1d9f0b33ea4888b
parent 26ae600b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1260,9 +1260,13 @@ public class AudioService extends IAudioService.Stub {
                }
                for (int stream = 0; stream < mStreamStates.length; stream++) {
                    if (streamTypeAlias == mStreamVolumeAlias[stream]) {
                        if (!(readCameraSoundForced()
                                    && (mStreamStates[stream].getStreamType()
                                        == AudioSystem.STREAM_SYSTEM_ENFORCED))) {
                            mStreamStates[stream].mute(state);
                        }
                    }
                }
            } else if ((direction == AudioManager.ADJUST_RAISE) &&
                    !checkSafeMediaVolume(streamTypeAlias, aliasIndex + step, device)) {
                Log.e(TAG, "adjustStreamVolume() safe volume index = " + oldIndex);