summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Panicker <apanicke@google.com>2016-09-08 10:55:51 -0700
committergitbuildkicker <android-build@google.com>2016-09-27 15:58:58 -0700
commit0665d10ab564a373ee235b90af96f589dc455068 (patch)
treecb3f3b0475e6bbc21e01cc4035811582aef44fe0
parent122feb9a0b04290f55183ff2f0384c6c53756bd8 (diff)
downloadandroid_packages_apps_Bluetooth-0665d10ab564a373ee235b90af96f589dc455068.tar.gz
android_packages_apps_Bluetooth-0665d10ab564a373ee235b90af96f589dc455068.tar.bz2
android_packages_apps_Bluetooth-0665d10ab564a373ee235b90af96f589dc455068.zip
Fix setPairingConfirmation permissions issue (1/2)
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. 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 3b96b7f95..3ac242ccd 100644
--- a/src/com/android/bluetooth/btservice/AdapterService.java
+++ b/src/com/android/bluetooth/btservice/AdapterService.java
@@ -1758,8 +1758,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;