Loading media/libaudioclient/AudioProductStrategy.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -60,9 +60,13 @@ aidl2legacy_AudioProductStrategy(const media::AudioProductStrategy& aidl) { } // Keep in sync with android/media/audiopolicy/AudioProductStrategy#attributeMatches int AudioProductStrategy::attributesMatchesScore(const audio_attributes_t refAttributes, const audio_attributes_t clientAttritubes) int AudioProductStrategy::attributesMatchesScore(audio_attributes_t refAttributes, audio_attributes_t clientAttritubes) { refAttributes.flags = static_cast<audio_flags_mask_t>( refAttributes.flags & AUDIO_FLAGS_AFFECT_STRATEGY_SELECTION); clientAttritubes.flags = static_cast<audio_flags_mask_t>( clientAttritubes.flags & AUDIO_FLAGS_AFFECT_STRATEGY_SELECTION); if (refAttributes == clientAttritubes) { return MATCH_EQUALS; } Loading media/libaudioclient/include/media/AudioProductStrategy.h +4 −4 Original line number Diff line number Diff line Loading @@ -58,11 +58,11 @@ public: * @return {@code INVALID_SCORE} if not matching, {@code MATCH_ON_DEFAULT_SCORE} if matching * to default strategy, non zero positive score if matching a strategy. */ static int attributesMatchesScore(const audio_attributes_t refAttributes, const audio_attributes_t clientAttritubes); static int attributesMatchesScore(audio_attributes_t refAttributes, audio_attributes_t clientAttritubes); static bool attributesMatches(const audio_attributes_t refAttributes, const audio_attributes_t clientAttritubes) { static bool attributesMatches(audio_attributes_t refAttributes, audio_attributes_t clientAttritubes) { return attributesMatchesScore(refAttributes, clientAttritubes) > 0; } Loading Loading
media/libaudioclient/AudioProductStrategy.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -60,9 +60,13 @@ aidl2legacy_AudioProductStrategy(const media::AudioProductStrategy& aidl) { } // Keep in sync with android/media/audiopolicy/AudioProductStrategy#attributeMatches int AudioProductStrategy::attributesMatchesScore(const audio_attributes_t refAttributes, const audio_attributes_t clientAttritubes) int AudioProductStrategy::attributesMatchesScore(audio_attributes_t refAttributes, audio_attributes_t clientAttritubes) { refAttributes.flags = static_cast<audio_flags_mask_t>( refAttributes.flags & AUDIO_FLAGS_AFFECT_STRATEGY_SELECTION); clientAttritubes.flags = static_cast<audio_flags_mask_t>( clientAttritubes.flags & AUDIO_FLAGS_AFFECT_STRATEGY_SELECTION); if (refAttributes == clientAttritubes) { return MATCH_EQUALS; } Loading
media/libaudioclient/include/media/AudioProductStrategy.h +4 −4 Original line number Diff line number Diff line Loading @@ -58,11 +58,11 @@ public: * @return {@code INVALID_SCORE} if not matching, {@code MATCH_ON_DEFAULT_SCORE} if matching * to default strategy, non zero positive score if matching a strategy. */ static int attributesMatchesScore(const audio_attributes_t refAttributes, const audio_attributes_t clientAttritubes); static int attributesMatchesScore(audio_attributes_t refAttributes, audio_attributes_t clientAttritubes); static bool attributesMatches(const audio_attributes_t refAttributes, const audio_attributes_t clientAttritubes) { static bool attributesMatches(audio_attributes_t refAttributes, audio_attributes_t clientAttritubes) { return attributesMatchesScore(refAttributes, clientAttritubes) > 0; } Loading