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

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

[DO NOT MERGE] Fix setPairingConfirmation permissions issue (1/2) am: dff35ac1

am: 8830aa2a

Change-Id: I0066914efcd0dd741b4d27d3633d49248180578e
parents 0255a374 8830aa2a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1560,8 +1560,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;