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

Commit de23b98a authored by Andy Hung's avatar Andy Hung Committed by Automerger Merge Worker
Browse files

Merge "AudioFlinger: Remove unnecessary AudioPolicy check in...

Merge "AudioFlinger: Remove unnecessary AudioPolicy check in onTransactWrapper" into main am: 21261409

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2832879



Change-Id: I30d86b92a7c3c170679e35856a4a4c929c845110
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6dee34f9 21261409
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -4752,16 +4752,6 @@ status_t AudioFlinger::onTransactWrapper(TransactionCode code,
    mediautils::TimeCheck::kDefaultSecondChanceDuration,
    true /* crashOnTimeout */);

    // Make sure we connect to Audio Policy Service before calling into AudioFlinger:
    //  - AudioFlinger can call into Audio Policy Service with its global mutex held
    //  - If this is the first time Audio Policy Service is queried from inside audioserver process
    //  this will trigger Audio Policy Manager initialization.
    //  - Audio Policy Manager initialization calls into AudioFlinger which will try to lock
    //  its global mutex and a deadlock will occur.
    if (IPCThreadState::self()->getCallingPid() != getpid()) {
        AudioSystem::get_audio_policy_service();
    }

    return delegate();
}