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

Commit ef52b30f authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

AudioFlinger: put effect desc lookup under mutex for createEffect

am: a41770b6

Change-Id: I496c058113e7f5b36d049cca1a978e191b987142
parents 093bba3a a41770b6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2882,6 +2882,8 @@ sp<IEffect> AudioFlinger::createEffect(
    }

    {
        Mutex::Autolock _l(mLock);

        if (!EffectsFactoryHalInterface::isNullUuid(&pDesc->uuid)) {
            // if uuid is specified, request effect descriptor
            lStatus = mEffectsFactoryHal->getDescriptor(&pDesc->uuid, &desc);
@@ -2937,6 +2939,8 @@ sp<IEffect> AudioFlinger::createEffect(
                desc = d;
            }
        }
    }
    {

        // Do not allow auxiliary effects on a session different from 0 (output mix)
        if (sessionId != AUDIO_SESSION_OUTPUT_MIX &&