diff options
author | Ajay Panicker <apanicke@google.com> | 2016-09-08 10:55:51 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@cyngn.com> | 2016-11-10 13:53:26 -0800 |
commit | f29e9523ef43d53357c8f60171ec3c617e2f47aa (patch) | |
tree | 5ac3a456f2d501324bf4d2b0fed7ea154c75d55e | |
parent | 71c517a6d2b74d862522e83797eecd5d23e9918a (diff) | |
download | android_packages_apps_Bluetooth-f29e9523ef43d53357c8f60171ec3c617e2f47aa.tar.gz android_packages_apps_Bluetooth-f29e9523ef43d53357c8f60171ec3c617e2f47aa.tar.bz2 android_packages_apps_Bluetooth-f29e9523ef43d53357c8f60171ec3c617e2f47aa.zip |
Fix setPairingConfirmation permissions issue (1/2)stable/cm-13.0-ZNH2K
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 df3304a333d8c385f9d5cb0e691fb72d940ec273)
-rw-r--r-- | src/com/android/bluetooth/btservice/AdapterService.java | 4 |
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 86b3cecac..e95577dcb 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; |