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

Commit 0428fecb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move AudioSystem errorCallback call out from gLock" into rvc-dev

parents 967bfe95 69330d4c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ const sp<IAudioFlinger> AudioSystem::get_audio_flinger()
{
    sp<IAudioFlinger> af;
    sp<AudioFlingerClient> afc;
    bool reportNoError = false;
    {
        Mutex::Autolock _l(gLock);
        if (gAudioFlinger == 0) {
@@ -70,7 +71,7 @@ const sp<IAudioFlinger> AudioSystem::get_audio_flinger()
            if (gAudioFlingerClient == NULL) {
                gAudioFlingerClient = new AudioFlingerClient();
            } else {
                reportError(NO_ERROR);
                reportNoError = true;
            }
            binder->linkToDeath(gAudioFlingerClient);
            gAudioFlinger = interface_cast<IAudioFlinger>(binder);
@@ -86,6 +87,7 @@ const sp<IAudioFlinger> AudioSystem::get_audio_flinger()
        af->registerClient(afc);
        IPCThreadState::self()->restoreCallingIdentity(token);
    }
    if (reportNoError) reportError(NO_ERROR);
    return af;
}