summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Panicker <apanicke@google.com>2016-09-08 17:55:51 (GMT)
committerJessica Wagantall <jwagantall@cyngn.com>2016-11-16 22:19:31 (GMT)
commit638dfd01873fe26380eac4736145e48ac5a2341c (patch)
tree736a28637e222c638500b02863dd4fc2dc9c5aae
parent52f539007e89afe1e5451e0f90c9a918020d78db (diff)
downloadandroid_packages_apps_Bluetooth-stable/cm-12.1-YOG4P.zip
android_packages_apps_Bluetooth-stable/cm-12.1-YOG4P.tar.gz
android_packages_apps_Bluetooth-stable/cm-12.1-YOG4P.tar.bz2
Fix setPairingConfirmation permissions issue (1/2)stable/cm-12.1-YOG4P
setPairingConfirmation was set to only require BLUETOOTH_ADMIN permission which shouldn't be able to set the confirmation itself. This is restricted to BLUETOOTH_PRIVILEGED permission. CYNGNOS-3303 Bug: 29043989 Change-Id: Iae8e31b25795989446265fdcc5eb27e6ffaf29aa (cherry picked from commit 554f13336ef3e9b96f7e912c562935903bc6be75) (cherry picked from commit e7095a79e346d99036386c09063a288660cf6ba3)
-rw-r--r--src/com/android/bluetooth/btservice/AdapterService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/bluetooth/btservice/AdapterService.java b/src/com/android/bluetooth/btservice/AdapterService.java
index f84409c..2b96572 100644
--- a/src/com/android/bluetooth/btservice/AdapterService.java
+++ b/src/com/android/bluetooth/btservice/AdapterService.java
@@ -1818,8 +1818,8 @@ public class AdapterService extends Service {
}
boolean setPairingConfirmation(BluetoothDevice device, boolean accept) {
- enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM,
- "Need BLUETOOTH ADMIN permission");
+ enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED,
+ "Need BLUETOOTH PRIVILEGED permission");
DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
if (deviceProp == null || deviceProp.getBondState() != BluetoothDevice.BOND_BONDING) {
return false;