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