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

Skip to content
Commit a7ed5276 authored by Jan Sebechlebsky's avatar Jan Sebechlebsky Committed by Ján Sebechlebský
Browse files

Fix incorrect getDeviceAndMixForInputSource matching logic

...and refactor mix matching in AudioPolicyMix.

The logic for matching the mix for output is (not changed) following:
 - If any of the exclude criteria are matched, the mix does not match.
 - For any of the positive criteria "dimensions" (usage, uid, etc..)
   present at least one criterion must match for the mix to match.

The input matching originally didn't follow this logic, it was
implemented in a way that if any criterion matched the whole mix was
considered matched. This also caused that exclude criterion caused
the mix to match anything except the excluded condition (adding
exclude criterion for non-existing UID would cause the mix to always
match). See b/245298949 for more details. With this cl, the input mix
matching follows the same logic as used for output (see above).

Bug: 233910083
Bug: 245298949
Test: atest AudioServiceHostTest AudioHostTest AudioPolicyHostTest
Test: audiosystem_tests audiopolicy_tests
Change-Id: Ib4f2e8f3b4c8b39da5688f3d5ba2359af2868957
Merged-In: Ib4f2e8f3b4c8b39da5688f3d5ba2359af2868957
parent d906119a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment