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

Commit d8231046 authored by Jaideep Sharma's avatar Jaideep Sharma
Browse files

av: Fix command/setParameter for inactive subEffects

Fix the code to send command, setParameters for inactive
subeffects. With current conditional, if active subeffect
is at index 0 then all other subeffects won't be iterated.
Fix by running over all items and then skipping for active
index.

Bug: 295787396

Change-Id: I49a794fa121c5b78b239906067b95572d84bc0c3
parent a8fb9121
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -238,7 +238,10 @@ ndk::ScopedAStatus EffectProxy::runWithActiveSubEffectThenOthers(
    }

    // proceed with others
    for (size_t i = 0; i < mSubEffects.size() && i != mActiveSubIdx; i++) {
    for (size_t i = 0; i < mSubEffects.size(); i++) {
        if (i == mActiveSubIdx) {
            continue;
        }
        if (!mSubEffects[i].handle) {
            ALOGE("%s null sub-effect interface for %s", __func__,
                  mSubEffects[i].descriptor.common.id.uuid.toString().c_str());