Add ability to generate remote call recording tone.
Add Telecom support to generate a call recording tone in the outgoing
telephony audio stream when a recording app is enabled on the device.
The new CallRecordingTonePlayer will play a call recording warning tone to
the remote user via outgoing telephony audio stream. This functionality
if gated on device support and carrier config in the telephony stack.
Test: Added new unit tests. Manually changed carrier config to enable
tones on local deice, installed audio recording app and verified while it
is recording the tone is audible on remote end.
Bug: 64138141
Change-Id: Ifcf5a49704af5a1352527e705e7d2a3bc16d7fdd
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4f1cb8b..2e3bc37 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -36,6 +36,8 @@
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
<uses-permission android:name="android.permission.MANAGE_USERS" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+ <!-- Required to determine source of ongoing audio recordings. -->
+ <uses-permission android:name="android.permission.MODIFY_AUDIO_ROUTING" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.STOP_APP_SWITCHES" />