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

Commit e31fe9b7 authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Automerger Merge Worker
Browse files

libaudioclient: Fix error handling in AudioEffect::set am: abd6e9d8

Change-Id: Ic3b5ca00066c14dbd7abc974f92759607d9eed2d
parents 3bdd6d99 abd6e9d8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -151,11 +151,13 @@ status_t AudioEffect::set(const effect_uuid_t *type,
    // audio flinger will not be retained. initCheck() will return the creation status
    // but all other APIs will return invalid operation.
    if (probe || iEffect == 0 || (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS)) {
        char typeBuffer[64], uuidBuffer[64];
        char typeBuffer[64] = {}, uuidBuffer[64] = {};
        guidToString(type, typeBuffer, sizeof(typeBuffer));
        guidToString(uuid, uuidBuffer, sizeof(uuidBuffer));
        ALOGE_IF(!probe, "set(): AudioFlinger could not create effect %s / %s, status: %d",
                typeBuffer, uuidBuffer, mStatus);
                type != nullptr ? typeBuffer : "NULL",
                uuid != nullptr ? uuidBuffer : "NULL",
                mStatus);
        if (!probe && iEffect == 0) {
            mStatus = NO_INIT;
        }