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
Loading
Please register or sign in to comment