Introduce playback capture application manifest flag
Allow apps to opt-out of their playback beeing recorded with an application wide out-out. Previously an application had to opt-out on each of its audio tracks. Application targeting an SDK < Q are considered opt-out by default. Application targeting an SDK >= Q are considered opt-in by default. Test: adb shell audiorecorder --target /data/file1.raw & adb shell am start -a android.intent.action.VIEW -d file:///system/media/audio/ringtones/Lollipop.ogg -t audio/ogg adb dumpsys media.audio_policy # check playback is *not* recorded # change packages/apps/Music manifest to allowPlaybackCapture=true adb install out/target/product/walleye/system/product/app/Music/Music.apk adb shell am start -a android.intent.action.VIEW -d file:///system/media/audio/ringtones/Lollipop.ogg -t audio/ogg adb dumpsys media.audio_policy # check playback is recorded kill %1 adb pull /data/file1.raw && sox -r 48000 -e signed -b 16 -c 2 file1.raw file.wav&& audacity file.wav # check that the audio file contains first silence then the ringtone after the manifest flag was added Bug: 111453086 Change-Id: Ie617b15f481a7f148b6e9fc9d64e61acaa5ce71d Signed-off-by: Kevin Rocard <krocard@google.com>
Loading
Please register or sign in to comment