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

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

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

Fix setPairingConfirmation permissions issue (1/2) am: 93154371 am: f680cbb0 am: d62f491f am: 976bdb04 am: 81e3fdf6
am: 5a837c9e

Change-Id: Iecae3b133a96b2195c64894f55a2330534834d5b
parents 13ef6c68 5a837c9e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1990,8 +1990,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;