Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 976bdb04 authored by Ajay Panicker's avatar Ajay Panicker Committed by android-build-merger
Browse files

Fix setPairingConfirmation permissions issue (1/2) am: 93154371 am: f680cbb0

am: d62f491f

Change-Id: Iba991daf03a221a4fff7a575dcdffd7181a70861
parents 594cee87 d62f491f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1766,8 +1766,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;