From 11ab8b2042acb1fa126fef2a81d7674538b59e44 Mon Sep 17 00:00:00 2001 From: Jay Thomas Sullivan Date: Mon, 8 Mar 2021 03:34:45 +0000 Subject: [PATCH] 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 --- core/api/current.txt | 3 +++ core/res/AndroidManifest.xml | 24 ++++++++++++++++++++++++ core/res/res/values/strings.xml | 13 +++++++++++++ 3 files changed, 40 insertions(+) diff --git a/core/api/current.txt b/core/api/current.txt index 001e960d2867f..e895813714022 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -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"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 29fa70de43a2c..480e1dee976a1 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1388,6 +1388,14 @@ android:backgroundPermission="android.permission.BACKGROUND_CAMERA" android:protectionLevel="dangerous|instant" /> + + + + + + + + take pictures and record video + + Nearby Bluetooth Devices + + discover and connect to nearby Bluetooth devices + Call logs @@ -1471,6 +1476,14 @@ Allows the app to view the configuration of the Bluetooth on the phone, and to make and accept connections with paired devices. + + discover and pair nearby Bluetooth devices + + Allows the app to discover and pair nearby Bluetooth devices + + connect to paired Bluetooth devices + + Allows the app to connect to paired Bluetooth devices Preferred NFC Payment Service Information