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

Commit ce3d3ef7 authored by James Dong's avatar James Dong
Browse files

Fix one of the potential ANR issues from AwesomePlayer

Change-Id: I8ac7bbb5fe219f65bdbdd223538fbac0575e2957
related-to-bug: 6565826
parent 958f463c
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(