Skip to content
Commit c16bba7a authored by Jan Sebechlebsky's avatar Jan Sebechlebsky
Browse files

Throw exception when attempting to build empty AudioMixingRule.

This fixes
android.media.audio.cts.AudioPlaybackCaptureTest#testMatchNothing.

The test asserts that attempting to capture playback with no
criteria specified throws and Exception. However, the reason why
the test was passing and Exception thrown was not because of
explicit check for empty AudioMixingRule, but because of
invalid mix role (not adding any rules prior to ag/20001744
caused mix type not to be inferred). If the mix role was
explicitly set for the AudioMixingRule.Builder the test would
also fail the expectation.
This cl is adding explicit check for the presence of rules when
building AudioMixingRule to fix this.

Bug: 252822301
Test: atest AudioPlaybackCaptureTest
Change-Id: If3caa635b67eca779bb2026d2da1c4727e4636e9
parent 24c1470c
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