summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Eric Laurent <elaurent@google.com> 2019-04-03 16:41:39 -0700
committer Eric Laurent <elaurent@google.com> 2019-04-04 18:07:02 +0000
commit337a86626e1b400a113ce5facf62fa4f6c7e7c43 (patch)
tree3475eb5f70937ca2419179b7d9e292315a353b50
parentdd07ae579c291a2b6ffe09bd576fd908eb9e5ddd (diff)
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 9b0bb840cd082822487e6cfe8c4470ce928d7531)
-rw-r--r--media/java/android/media/audiopolicy/AudioProductStrategy.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/java/android/media/audiopolicy/AudioProductStrategy.java b/media/java/android/media/audiopolicy/AudioProductStrategy.java
index 48500e01e86a..c1c255f68996 100644
--- a/media/java/android/media/audiopolicy/AudioProductStrategy.java
+++ b/media/java/android/media/audiopolicy/AudioProductStrategy.java
@@ -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));
}