Skip to content

Commit 26f6eb7

Browse files
jamuraagitbuildkicker
authored andcommitted
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 93326cf)
1 parent 23e6629 commit 26f6eb7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/java/android/bluetooth/BluetoothDevice.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,12 +1153,12 @@ public boolean setPasskey(int passkey) {
11531153

11541154
/**
11551155
* Confirm passkey for {@link #PAIRING_VARIANT_PASSKEY_CONFIRMATION} pairing.
1156-
* <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}.
1156+
* <p>Requires {@link android.Manifest.permission#BLUETOOTH_PRIVILEGED}.
11571157
*
11581158
* @return true confirmation has been sent out
11591159
* false for error
11601160
*/
1161-
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
1161+
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
11621162
public boolean setPairingConfirmation(boolean confirm) {
11631163
if (sService == null) {
11641164
Log.e(TAG, "BT not enabled. Cannot set pairing confirmation");

0 commit comments

Comments
 (0)