MediaProjectionManager.createScreenCaptureIntent()
AndroidManifest.xml
<application
...
android:allowAudioPlaybackCapture="false"/>
AudioManager.setAllowedCapturePolicy(ALLOW_CAPTURE_BY_SYSTEM)
AudioAttributes.Builder.setAllowedCapturePolicy(ALLOW_CAPTURE_BY_SYSTEM)
AudioManager.setAllowedCapturePolicy(ALLOW_CAPTURE_BY_NONE)
AudioAttributes.Builder.setAllowedCapturePolicy(ALLOW_CAPTURE_BY_NONE)
android:allowAudioPlaybackCapture="true"
manifest.xml