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

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

Fix setPairingConfirmation permissions issue (1/2)

am: 93154371

Change-Id: Idc90fd17ec010ba786412d76496cd6f89df139b5
parents 63fb1cf4 93154371
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;