audio policy: fix selected device Id in getOutputForAttr
Restore passing of selected device ID to audio policy manager by
getOutputForAttr() and getInputForAttr() which was dropped by commit
0a4904a1.
Bug: 178950206
Test: atest android.media.cts.RoutingTest#test_mediaPlayer_incallMusicRoutingPermissions
Change-Id: Iebadec1674a838a276cd0c803a978af2c21fa64b
diff --git a/services/audiopolicy/service/AudioPolicyService.h b/services/audiopolicy/service/AudioPolicyService.h
index c22ed9b..72d8f28 100644
--- a/services/audiopolicy/service/AudioPolicyService.h
+++ b/services/audiopolicy/service/AudioPolicyService.h
@@ -81,7 +81,7 @@
binder::Status getOutput(media::AudioStreamType stream, int32_t* _aidl_return) override;
binder::Status getOutputForAttr(const media::AudioAttributesInternal& attr, int32_t session,
int32_t pid, int32_t uid, const media::AudioConfig& config,
- int32_t flags,
+ int32_t flags, int32_t selectedDeviceId,
media::GetOutputForAttrResponse* _aidl_return) override;
binder::Status startOutput(int32_t portId) override;
binder::Status stopOutput(int32_t portId) override;
@@ -90,6 +90,7 @@
int32_t riid, int32_t session, int32_t pid, int32_t uid,
const std::string& opPackageName,
const media::AudioConfigBase& config, int32_t flags,
+ int32_t selectedDeviceId,
media::GetInputForAttrResponse* _aidl_return) override;
binder::Status startInput(int32_t portId) override;
binder::Status stopInput(int32_t portId) override;