AudioMix: Do not compare rules of different types

That would lead to NullPointerException as some fields of
AudioMixMatchCriterion are null in some type but not others.

When first registering a UID rule, the register criterion had a null
mAttr. If a USAGE criterion was then added, it would be compared to the
exsting rule as if it was an USAGE rule. As mAttr was null, a
NullPointerException was thrown.

Test: first register a UID rule, then a USAGE rule.
Test: atest android.media.cts.AudioPlaybackCaptureTest#testCaptureMediaUsage
Bug: 111453086
Change-Id: Iece913b87a627171c0a1f872aa57c5125d0ba782
Signed-off-by: Kevin Rocard <krocard@google.com>
1 file changed