fix AudioAttributes matching rule in AudioProductStrategy

The matching rule on audio attributes flags must be that ALL flags
set in the reference attributes are present in the compared attributes
and not just some flags.

Bug: 129721367
Test: change volume in Play Music
Change-Id: I462fd73fb9b78b094411c6f3b52004349f49bcf3
(cherry picked from commit 9b0bb840cd)
This commit is contained in:
Eric Laurent
2019-04-03 16:41:39 -07:00
parent dd07ae579c
commit 337a86626e

View File

@@ -262,7 +262,7 @@ public final class AudioProductStrategy implements Parcelable {
|| (attr.getContentType() == refAttr.getContentType()))
&& ((refAttr.getAllFlags() == 0)
|| (attr.getAllFlags() != 0
&& (attr.getAllFlags() & refAttr.getAllFlags()) == attr.getAllFlags()))
&& (attr.getAllFlags() & refAttr.getAllFlags()) == refAttr.getAllFlags()))
&& ((refFormattedTags.length() == 0) || refFormattedTags.equals(cliFormattedTags));
}