summaryrefslogtreecommitdiffstats
path: root/media/libaudioclient
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2019-04-03 16:46:37 -0700
committerEric Laurent <elaurent@google.com>2019-04-04 18:06:37 +0000
commit06c6b9a0f9c964270d78d62a08e964d9212faa0c (patch)
treeb10f5e347742cddc2e4fc2c188c7099c5b72982b /media/libaudioclient
parent0e5a1b3bb64d9a5d38903770e018379856401efd (diff)
downloadframeworks_av-06c6b9a0f9c964270d78d62a08e964d9212faa0c.tar.gz
frameworks_av-06c6b9a0f9c964270d78d62a08e964d9212faa0c.tar.bz2
frameworks_av-06c6b9a0f9c964270d78d62a08e964d9212faa0c.zip
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: I6b5ada937aa169dbf1b0315d56172ae3b7bb4f47 (cherry picked from commit c0c6074f55a0775ff127814c58c56a748e1a1b50)
Diffstat (limited to 'media/libaudioclient')
-rw-r--r--media/libaudioclient/AudioProductStrategy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libaudioclient/AudioProductStrategy.cpp b/media/libaudioclient/AudioProductStrategy.cpp
index 1da1114709..0e1dfac023 100644
--- a/media/libaudioclient/AudioProductStrategy.cpp
+++ b/media/libaudioclient/AudioProductStrategy.cpp
@@ -86,7 +86,7 @@ bool AudioProductStrategy::attributesMatches(const audio_attributes_t refAttribu
(clientAttritubes.content_type == refAttributes.content_type)) &&
((refAttributes.flags == AUDIO_FLAG_NONE) ||
(clientAttritubes.flags != AUDIO_FLAG_NONE &&
- (clientAttritubes.flags & refAttributes.flags) == clientAttritubes.flags)) &&
+ (clientAttritubes.flags & refAttributes.flags) == refAttributes.flags)) &&
((strlen(refAttributes.tags) == 0) ||
(std::strcmp(clientAttritubes.tags, refAttributes.tags) == 0));
}