From 916f3d32d4630b37304e2967fb30f5cd4f73a373 Mon Sep 17 00:00:00 2001 From: Evan Severson Date: Thu, 6 Aug 2020 13:54:37 -0700 Subject: [PATCH] Add background microphone and camera permission Test: Build Bug: 158311343 Change-Id: I55bd847690e376e0a06a932d93c5b607ad1ced05 --- api/current.txt | 2 ++ core/res/AndroidManifest.xml | 22 ++++++++++++++++++++++ core/res/res/values/strings.xml | 14 ++++++++++++-- non-updatable-api/current.txt | 2 ++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/api/current.txt b/api/current.txt index 049ce215b0ddc..5d87ab192b581 100644 --- a/api/current.txt +++ b/api/current.txt @@ -21,6 +21,7 @@ package android { field public static final String ACTIVITY_RECOGNITION = "android.permission.ACTIVITY_RECOGNITION"; field public static final String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL"; field public static final String ANSWER_PHONE_CALLS = "android.permission.ANSWER_PHONE_CALLS"; + field public static final String BACKGROUND_CAMERA = "android.permission.BACKGROUND_CAMERA"; field public static final String BATTERY_STATS = "android.permission.BATTERY_STATS"; field public static final String BIND_ACCESSIBILITY_SERVICE = "android.permission.BIND_ACCESSIBILITY_SERVICE"; field public static final String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET"; @@ -129,6 +130,7 @@ package android { field public static final String RECEIVE_SMS = "android.permission.RECEIVE_SMS"; field public static final String RECEIVE_WAP_PUSH = "android.permission.RECEIVE_WAP_PUSH"; field public static final String RECORD_AUDIO = "android.permission.RECORD_AUDIO"; + field public static final String RECORD_BACKGROUND_AUDIO = "android.permission.RECORD_BACKGROUND_AUDIO"; field public static final String REORDER_TASKS = "android.permission.REORDER_TASKS"; field public static final String REQUEST_COMPANION_RUN_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND"; field public static final String REQUEST_COMPANION_USE_DATA_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 34543f13c1667..5074df4704109 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1244,8 +1244,19 @@ android:permissionGroup="android.permission-group.UNDEFINED" android:label="@string/permlab_recordAudio" android:description="@string/permdesc_recordAudio" + android:backgroundPermission="android.permission.RECORD_BACKGROUND_AUDIO" android:protectionLevel="dangerous|instant" /> + + + @@ -1313,8 +1324,19 @@ android:permissionGroup="android.permission-group.UNDEFINED" android:label="@string/permlab_camera" android:description="@string/permdesc_camera" + android:backgroundPermission="android.permission.BACKGROUND_CAMERA" android:protectionLevel="dangerous|instant" /> + + + record audio - This app can record audio using the microphone at any time. + This app can record audio using the microphone while the app is in use. + + + record audio in the background + + This app can record audio using the microphone at any time. send commands to the SIM @@ -1181,7 +1186,12 @@ take pictures and videos - This app can take pictures and record videos using the camera at any time. + This app can take pictures and record videos using the camera while the app is in use. + + + take pictures and videos in the background + + This app can take pictures and record videos using the camera at any time. Allow an application or service access to system cameras to take pictures and videos diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt index 739895e6be1af..6a9dc2df612c5 100644 --- a/non-updatable-api/current.txt +++ b/non-updatable-api/current.txt @@ -21,6 +21,7 @@ package android { field public static final String ACTIVITY_RECOGNITION = "android.permission.ACTIVITY_RECOGNITION"; field public static final String ADD_VOICEMAIL = "com.android.voicemail.permission.ADD_VOICEMAIL"; field public static final String ANSWER_PHONE_CALLS = "android.permission.ANSWER_PHONE_CALLS"; + field public static final String BACKGROUND_CAMERA = "android.permission.BACKGROUND_CAMERA"; field public static final String BATTERY_STATS = "android.permission.BATTERY_STATS"; field public static final String BIND_ACCESSIBILITY_SERVICE = "android.permission.BIND_ACCESSIBILITY_SERVICE"; field public static final String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET"; @@ -129,6 +130,7 @@ package android { field public static final String RECEIVE_SMS = "android.permission.RECEIVE_SMS"; field public static final String RECEIVE_WAP_PUSH = "android.permission.RECEIVE_WAP_PUSH"; field public static final String RECORD_AUDIO = "android.permission.RECORD_AUDIO"; + field public static final String RECORD_BACKGROUND_AUDIO = "android.permission.RECORD_BACKGROUND_AUDIO"; field public static final String REORDER_TASKS = "android.permission.REORDER_TASKS"; field public static final String REQUEST_COMPANION_RUN_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_RUN_IN_BACKGROUND"; field public static final String REQUEST_COMPANION_USE_DATA_IN_BACKGROUND = "android.permission.REQUEST_COMPANION_USE_DATA_IN_BACKGROUND";