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

Commit 1d24c651 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: I90ba089aa50bf6260bc91287954addd23f63d51d
parents b049f16e 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;
        }