summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Panicker <apanicke@google.com>2016-09-08 17:55:51 (GMT)
committerAdrian DC <radian.dc@gmail.com>2016-12-03 21:39:59 (GMT)
commitd1faefe795b359c06bff89ce177e5a1f6c43367b (patch)
treedecd3875768a3b4291ac1cd40730c8d7aa5a6aca
parenta0c7cf3b5c0d56f52f5aad7d81f49f72d3276f5c (diff)
downloadandroid_packages_apps_Bluetooth-stable/cm-13.0-ZNH5Y.zip
android_packages_apps_Bluetooth-stable/cm-13.0-ZNH5Y.tar.gz
android_packages_apps_Bluetooth-stable/cm-13.0-ZNH5Y.tar.bz2
Fix setPairingConfirmation permissions issue (1/2)stable/cm-13.0-ZNH5Y
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. RM-290 Bug: 29043989 Change-Id: Iae8e31b25795989446265fdcc5eb27e6ffaf29aa (cherry picked from commit df3304a333d8c385f9d5cb0e691fb72d940ec273)
-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 86b3cec..e95577d 100644
--- a/src/com/android/bluetooth/btservice/AdapterService.java
+++ b/src/com/android/bluetooth/btservice/AdapterService.java
@@ -2103,8 +2103,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;