diff options
author | Ajay Panicker <apanicke@google.com> | 2016-09-08 10:55:51 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@cyngn.com> | 2016-11-09 16:25:46 -0800 |
commit | 217b00000bdc8f17382e21b45f994495032f3a5a (patch) | |
tree | a925a466ddda62826999dd1226a476bec7c15cf9 | |
parent | 61cdf4342afb40f5febba4e8a2bd5aa679a07ea0 (diff) | |
download | android_packages_apps_Bluetooth-stable/cm-13.0-ZNH0E.tar.gz android_packages_apps_Bluetooth-stable/cm-13.0-ZNH0E.tar.bz2 android_packages_apps_Bluetooth-stable/cm-13.0-ZNH0E.zip |
Fix setPairingConfirmation permissions issue (1/2)stable/cm-13.0-ZNH0E
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 a8e5d56d0..91a26260d 100644 --- a/src/com/android/bluetooth/btservice/AdapterService.java +++ b/src/com/android/bluetooth/btservice/AdapterService.java @@ -2039,8 +2039,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; |