Skip to content
Commit f91d50b6 authored by Kevin Rocard's avatar Kevin Rocard
Browse files

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: default avatarKevin Rocard <krocard@google.com>
parent 2f9dd0aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment