diff options
author | Marie Janssen <jamuraa@google.com> | 2016-08-09 13:23:39 -0700 |
---|---|---|
committer | The Android Automerger <android-build@android.com> | 2016-09-27 00:15:20 -0700 |
commit | b1dc1757071ba46ee653d68f331486e86778b8e4 (patch) | |
tree | 2c24b5b63a0a1a88b023c0fb9a31752257ae9e91 | |
parent | 73fdb1af54c396e87c5b7e07c6a84296f4bdb33b (diff) | |
download | base-b1dc1757071ba46ee653d68f331486e86778b8e4.tar.gz |
Fix setPairingConfirmation permissions issue (2/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: I887de32d156e672ec44aa0b286cd7ea7f9f8ad55
(cherry picked from commit 93326cfd9fb8a20081baa9b975275772798cfd80)
-rw-r--r-- | core/java/android/bluetooth/BluetoothDevice.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java index f43fb30abb18..c12317f07718 100644 --- a/core/java/android/bluetooth/BluetoothDevice.java +++ b/core/java/android/bluetooth/BluetoothDevice.java @@ -1164,12 +1164,12 @@ public final class BluetoothDevice implements Parcelable { /** * Confirm passkey for {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing. - * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}. + * <p>Requires {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}. * * @return true confirmation has been sent out * false for error */ - @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) + @RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPairingConfirmation(boolean confirm) { if (sService == null) { Log.e(TAG, "BT not enabled. Cannot set pairing confirmation"); |