MediaRecorder: add privileged permission for AudioSource.RADIO_TUNER
MediaRecorder.AudioSource.RADIO_TUNER is @SystemApi and as such must be guarded by a privileged permission. Use android.permission.CAPTURE_AUDIO_OUTPUT as it matches the use case of capturing what is played by the device and not capturing from a microphone. Bug: 135717621 Test: CTS tests for AudioRecord Change-Id: Ic5dc191cb2340d7614f51c5acb0bac6156d214ab
This commit is contained in:
@@ -3638,7 +3638,7 @@ package android.media {
|
||||
public final class MediaRecorder.AudioSource {
|
||||
field @RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_OUTPUT) public static final int ECHO_REFERENCE = 1997; // 0x7cd
|
||||
field @RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_HOTWORD) public static final int HOTWORD = 1999; // 0x7cf
|
||||
field public static final int RADIO_TUNER = 1998; // 0x7ce
|
||||
field @RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_OUTPUT) public static final int RADIO_TUNER = 1998; // 0x7ce
|
||||
}
|
||||
|
||||
public class PlayerProxy {
|
||||
|
||||
@@ -337,9 +337,14 @@ public class MediaRecorder implements AudioRouting,
|
||||
|
||||
/**
|
||||
* Audio source for capturing broadcast radio tuner output.
|
||||
* Capturing the radio tuner output requires the
|
||||
* {@link android.Manifest.permission#CAPTURE_AUDIO_OUTPUT} permission.
|
||||
* This permission is reserved for use by system components and is not available to
|
||||
* third-party applications.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_OUTPUT)
|
||||
public static final int RADIO_TUNER = 1998;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user