Define new NEARBY_DEVICES permission group
This defines a new Android permission group named NEARBY_DEVICES, which is displayed to the user as "Nearby Bluetooth Devices". This also defines two new permissions: - BLUETOOTH_SCAN - BLUETOOTH_CONNECT The BLUETOOTH_SCAN permission is a new dangerous permission which will henceforth be used by applications that wish to be allowed to scan for or pair with Bluetooth devices. The BLUETOOTH_CONNECT permission, likewise, is used to connect to and communicate with already-paired devices. (As of this commit, these permissions are not yet used, and the corresponding AppOps are not yet mapped, so these changes do not yet have any effect.) Bug: 181813006 Test: manual Change-Id: I05c82ae05813189a5ec41656a15c6f4fc770ca57
This commit is contained in:
committed by
Jeff Sharkey
parent
b4c0d6464e
commit
11ab8b2042
@@ -55,7 +55,9 @@ package android {
|
||||
field public static final String BIND_WALLPAPER = "android.permission.BIND_WALLPAPER";
|
||||
field public static final String BLUETOOTH = "android.permission.BLUETOOTH";
|
||||
field public static final String BLUETOOTH_ADMIN = "android.permission.BLUETOOTH_ADMIN";
|
||||
field public static final String BLUETOOTH_CONNECT = "android.permission.BLUETOOTH_CONNECT";
|
||||
field public static final String BLUETOOTH_PRIVILEGED = "android.permission.BLUETOOTH_PRIVILEGED";
|
||||
field public static final String BLUETOOTH_SCAN = "android.permission.BLUETOOTH_SCAN";
|
||||
field public static final String BODY_SENSORS = "android.permission.BODY_SENSORS";
|
||||
field public static final String BROADCAST_PACKAGE_REMOVED = "android.permission.BROADCAST_PACKAGE_REMOVED";
|
||||
field public static final String BROADCAST_SMS = "android.permission.BROADCAST_SMS";
|
||||
@@ -194,6 +196,7 @@ package android {
|
||||
field public static final String CONTACTS = "android.permission-group.CONTACTS";
|
||||
field public static final String LOCATION = "android.permission-group.LOCATION";
|
||||
field public static final String MICROPHONE = "android.permission-group.MICROPHONE";
|
||||
field public static final String NEARBY_DEVICES = "android.permission-group.NEARBY_DEVICES";
|
||||
field public static final String PHONE = "android.permission-group.PHONE";
|
||||
field public static final String SENSORS = "android.permission-group.SENSORS";
|
||||
field public static final String SMS = "android.permission-group.SMS";
|
||||
|
||||
@@ -1388,6 +1388,14 @@
|
||||
android:backgroundPermission="android.permission.BACKGROUND_CAMERA"
|
||||
android:protectionLevel="dangerous|instant" />
|
||||
|
||||
<!-- Required to be able to discover and connect to nearby Bluetooth devices.
|
||||
<p>Protection level: dangerous -->
|
||||
<permission-group android:name="android.permission-group.NEARBY_DEVICES"
|
||||
android:icon="@drawable/ic_qs_bluetooth"
|
||||
android:label="@string/permgrouplab_nearby_devices"
|
||||
android:description="@string/permgroupdesc_nearby_devices"
|
||||
android:priority="750" />
|
||||
|
||||
<!-- @SystemApi @TestApi Required to be able to access the camera device in the background.
|
||||
This permission is not intended to be held by apps.
|
||||
<p>Protection level: internal
|
||||
@@ -1930,6 +1938,22 @@
|
||||
android:label="@string/permlab_bluetooth"
|
||||
android:protectionLevel="normal" />
|
||||
|
||||
<!-- Required to be able to discover and pair nearby Bluetooth devices.
|
||||
<p>Protection level: dangerous -->
|
||||
<permission android:name="android.permission.BLUETOOTH_SCAN"
|
||||
android:permissionGroup="android.permission-group.UNDEFINED"
|
||||
android:description="@string/permdesc_bluetooth_scan"
|
||||
android:label="@string/permlab_bluetooth_scan"
|
||||
android:protectionLevel="dangerous" />
|
||||
|
||||
<!-- Required to be able to connect to paired Bluetooth devices.
|
||||
<p>Protection level: dangerous -->
|
||||
<permission android:name="android.permission.BLUETOOTH_CONNECT"
|
||||
android:permissionGroup="android.permission-group.UNDEFINED"
|
||||
android:description="@string/permdesc_bluetooth_connect"
|
||||
android:label="@string/permlab_bluetooth_connect"
|
||||
android:protectionLevel="dangerous" />
|
||||
|
||||
<!-- @SystemApi @TestApi Allows an application to suspend other apps, which will prevent the
|
||||
user from using them until they are unsuspended.
|
||||
@hide
|
||||
|
||||
@@ -822,6 +822,11 @@
|
||||
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permgroupdesc_camera">take pictures and record video</string>
|
||||
|
||||
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=40]-->
|
||||
<string name="permgrouplab_nearby_devices">Nearby Bluetooth Devices</string>
|
||||
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE]-->
|
||||
<string name="permgroupdesc_nearby_devices">discover and connect to nearby Bluetooth devices</string>
|
||||
|
||||
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
<string name="permgrouplab_calllog">Call logs</string>
|
||||
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
|
||||
@@ -1471,6 +1476,14 @@
|
||||
<string name="permdesc_bluetooth" product="default">Allows the app to view the
|
||||
configuration of the Bluetooth on the phone, and to make and accept
|
||||
connections with paired devices.</string>
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=50]-->
|
||||
<string name="permlab_bluetooth_scan">discover and pair nearby Bluetooth devices</string>
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=120]-->
|
||||
<string name="permdesc_bluetooth_scan" product="default">Allows the app to discover and pair nearby Bluetooth devices</string>
|
||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=50]-->
|
||||
<string name="permlab_bluetooth_connect">connect to paired Bluetooth devices</string>
|
||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=120]-->
|
||||
<string name="permdesc_bluetooth_connect" product="default">Allows the app to connect to paired Bluetooth devices</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_preferredPaymentInfo">Preferred NFC Payment Service Information</string>
|
||||
|
||||
Reference in New Issue
Block a user