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:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user