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

Commit cac467b3 authored by James Dong's avatar James Dong Committed by Android (Google) Code Review
Browse files

Merge "Fix one of the potential ANR issues from AwesomePlayer" into jb-dev

parents b4ea1ab8 ce3d3ef7
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2120,7 +2120,13 @@ status_t AwesomePlayer::finishSetDataSource_l() {
        String8 mimeType;
        float confidence;
        sp<AMessage> dummy;
        bool success = SniffWVM(dataSource, &mimeType, &confidence, &dummy);
        bool success;

        // SniffWVM is potentially blocking since it may require network access.
        // Do not call it with mLock held.
        mLock.unlock();
        success = SniffWVM(dataSource, &mimeType, &confidence, &dummy);
        mLock.lock();

        if (!success
                || strcasecmp(