audio policy: Add call screen audio mode.
Add new audio mode AUDIO_MODE_CALL_SCREEN allowing call screening
to take place while other audio use cases are still active.
Also add API and audio policy configuration attribute to
indicate if the platform supports this audio mode.
Bug: 140384450
Test: make
Change-Id: If2fc56dbbd10aae2cf1498480471b35de0940228
diff --git a/media/libaudioclient/AudioSystem.cpp b/media/libaudioclient/AudioSystem.cpp
index 02dc516..20ca35c 100644
--- a/media/libaudioclient/AudioSystem.cpp
+++ b/media/libaudioclient/AudioSystem.cpp
@@ -1519,6 +1519,13 @@
return aps->setRttEnabled(enabled);
}
+bool AudioSystem::isCallScreenModeSupported()
+{
+ const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
+ if (aps == 0) return false;
+ return aps->isCallScreenModeSupported();
+}
+
// ---------------------------------------------------------------------------
int AudioSystem::AudioPolicyServiceClient::addAudioPortCallback(