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

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

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

Change-Id: If0eb1e63aacc1c45d950cb9b9fa8a0a08f1e5df7
parents a702fae2 24a8e738
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;
        }