Merge "Add SYSTEM_CAMERA capability to camera2 and define @SystemApi SYSTEM_CAMERA permissions."
This commit is contained in:
committed by
Android (Google) Code Review
commit
70809a1847
@@ -17074,6 +17074,7 @@ package android.hardware.camera2 {
|
||||
field public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; // 0x3
|
||||
field public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5; // 0x5
|
||||
field public static final int REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA = 13; // 0xd
|
||||
field public static final int REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA = 14; // 0xe
|
||||
field public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7; // 0x7
|
||||
field public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0; // 0x0
|
||||
field public static final int SCALER_CROPPING_TYPE_FREEFORM = 1; // 0x1
|
||||
|
||||
@@ -193,6 +193,7 @@ package android {
|
||||
field public static final String SUBSTITUTE_NOTIFICATION_APP_NAME = "android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME";
|
||||
field public static final String SUBSTITUTE_SHARE_TARGET_APP_NAME_AND_ICON = "android.permission.SUBSTITUTE_SHARE_TARGET_APP_NAME_AND_ICON";
|
||||
field public static final String SUSPEND_APPS = "android.permission.SUSPEND_APPS";
|
||||
field public static final String SYSTEM_CAMERA = "android.permission.SYSTEM_CAMERA";
|
||||
field public static final String TETHER_PRIVILEGED = "android.permission.TETHER_PRIVILEGED";
|
||||
field public static final String TV_INPUT_HARDWARE = "android.permission.TV_INPUT_HARDWARE";
|
||||
field public static final String TV_VIRTUAL_REMOTE_CONTROLLER = "android.permission.TV_VIRTUAL_REMOTE_CONTROLLER";
|
||||
|
||||
@@ -1955,6 +1955,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
|
||||
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA LOGICAL_MULTI_CAMERA}</li>
|
||||
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}</li>
|
||||
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA SECURE_IMAGE_DATA}</li>
|
||||
* <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA SYSTEM_CAMERA}</li>
|
||||
* </ul></p>
|
||||
* <p>This key is available on all devices.</p>
|
||||
*
|
||||
@@ -1973,6 +1974,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
|
||||
* @see #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
|
||||
* @see #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME
|
||||
* @see #REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA
|
||||
* @see #REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA
|
||||
*/
|
||||
@PublicKey
|
||||
@NonNull
|
||||
|
||||
@@ -996,6 +996,14 @@ public abstract class CameraMetadata<TKey> {
|
||||
*/
|
||||
public static final int REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA = 13;
|
||||
|
||||
/**
|
||||
* <p>The camera device is only accessible by Android's system components and privileged
|
||||
* applications. Processes need to have the android.permission.SYSTEM_CAMERA in
|
||||
* addition to android.permission.CAMERA in order to connect to this camera device.</p>
|
||||
* @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
|
||||
*/
|
||||
public static final int REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA = 14;
|
||||
|
||||
//
|
||||
// Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
|
||||
//
|
||||
|
||||
@@ -1264,6 +1264,15 @@
|
||||
android:description="@string/permdesc_camera"
|
||||
android:protectionLevel="dangerous|instant" />
|
||||
|
||||
<!-- @SystemApi Required in addition to android.permission.CAMERA to be able to access
|
||||
system only camera devices.
|
||||
<p>Protection level: system|signature
|
||||
@hide -->
|
||||
<permission android:name="android.permission.SYSTEM_CAMERA"
|
||||
android:permissionGroup="android.permission-group.UNDEFINED"
|
||||
android:label="@string/permlab_systemCamera"
|
||||
android:description="@string/permdesc_systemCamera"
|
||||
android:protectionLevel="system|signature" />
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Permissions for accessing the device sensors -->
|
||||
|
||||
@@ -1173,6 +1173,11 @@
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permdesc_camera">This app can take pictures and record videos using the camera at any time.</string>
|
||||
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
|
||||
<string name="permlab_systemCamera">Allow an application or service access to system cameras to take pictures and videos</string>
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR_LIMIT=NONE] -->
|
||||
<string name="permdesc_systemCamera">This privileged | system app can take pictures and record videos using a system camera at any time. Requires the android.permission.CAMERA permission to be held by the app as well</string>
|
||||
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permlab_vibrate">control vibration</string>
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
|
||||
@@ -322,6 +322,8 @@ applications that come with the platform
|
||||
<permission name="android.permission.SET_WALLPAPER" />
|
||||
<permission name="android.permission.SET_WALLPAPER_COMPONENT" />
|
||||
<permission name="android.permission.REQUEST_NOTIFICATION_ASSISTANT_SERVICE" />
|
||||
<!-- Permission required to test system only camera devices. -->
|
||||
<permission name="android.permission.SYSTEM_CAMERA" />
|
||||
<!-- Permission required to test ExplicitHealthCheckServiceImpl. -->
|
||||
<permission name="android.permission.BIND_EXPLICIT_HEALTH_CHECK_SERVICE"/>
|
||||
</privapp-permissions>
|
||||
|
||||
@@ -169,6 +169,9 @@
|
||||
<uses-permission android:name="android.permission.MANAGE_SENSORS" />
|
||||
<uses-permission android:name="android.permission.MANAGE_AUDIO_POLICY" />
|
||||
<uses-permission android:name="android.permission.MANAGE_CAMERA" />
|
||||
<!-- Permissions needed to test system only camera devices -->
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_CAMERA" />
|
||||
<!-- Permission needed to enable/disable Bluetooth/Wifi -->
|
||||
<uses-permission android:name="android.permission.MANAGE_BLUETOOTH_WHEN_WIRELESS_CONSENT_REQUIRED" />
|
||||
<uses-permission android:name="android.permission.MANAGE_WIFI_WHEN_WIRELESS_CONSENT_REQUIRED" />
|
||||
|
||||
Reference in New Issue
Block a user