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

Commit 7795e4a3 authored by Kevin Rocard's avatar Kevin Rocard
Browse files

Audio Policy: Do not stop getOutputForAttr on invalid Mix



This would allow an app that successfully registered an invalid mix to
block all following mixes.

Test: none
Bug: 111453086
Change-Id: I3c1630b7b697dd70e08a5708d1515e097d683401
Signed-off-by: default avatarKevin Rocard <krocard@google.com>
parent 32fa5079
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -147,7 +147,10 @@ status_t AudioPolicyMixCollection::getOutputForAttr(
        }

        switch (mixMatch(policyMix.get(), i, attributes, uid)) {
            case MixMatchStatus::INVALID_MIX: return BAD_VALUE; // TODO: Do we really want to abort?
            case MixMatchStatus::INVALID_MIX:
                // The mix has contradictory rules, ignore it
                // TODO: reject invalid mix at registration
                continue;
            case MixMatchStatus::NO_MATCH:
                ALOGV("%s: Mix %zu: does not match", __func__, i);
                continue; // skip the mix