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

Commit 8bdb01c2 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Don't purge effects we're about to start using

By acquiring the new session id before releasing the old, we prevent
purging existing effects with the new session id that aren't currently
attached but will be once the player is switched to the new session id.
b/8767565

Change-Id: I703881b69c5accd8832ac834246925a20ada4c21
parent b6ac8e2c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -575,8 +575,8 @@ status_t MediaPlayer::setAudioSessionId(int sessionId)
        return BAD_VALUE;
    }
    if (sessionId != mAudioSessionId) {
        AudioSystem::releaseAudioSessionId(mAudioSessionId);
        AudioSystem::acquireAudioSessionId(sessionId);
        AudioSystem::releaseAudioSessionId(mAudioSessionId);
        mAudioSessionId = sessionId;
    }
    return NO_ERROR;