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

Commit b072393e authored by Michael Bestas's avatar Michael Bestas Committed by Gerrit Code Review
Browse files

Prevent lock/unlock sound during music playback

Lock/unlock sound mixes in with music and causes
lag and distortion.

Change-Id: I9d3582c6bf28aa62a5a6712bc9e89eb2f73e0288
parent c95d62c1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1196,6 +1196,9 @@ public class KeyguardViewMediator {
            // If the stream is muted, don't play the sound
            if (mAudioManager.isStreamMute(mMasterStreamType)) return;

            // If music is playing, don't play the sound
            if (mAudioManager.isMusicActive()) return;

            mLockSoundStreamId = mLockSounds.play(whichSound,
                    mLockSoundVolume, mLockSoundVolume, 1/*priortiy*/, 0/*loop*/, 1.0f/*rate*/);
        }