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

Commit 3450cae7 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: 3eea4cdf

Change-Id: I5932ce563c8858824a6aa8732f13aecb00d9099e
parents 14759423 3eea4cdf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1296,8 +1296,8 @@ public class AdapterService extends Service {
    }

     boolean setPairingConfirmation(BluetoothDevice device, boolean accept) {
        enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM,
                                       "Need BLUETOOTH ADMIN permission");
        enforceCallingOrSelfPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED,
                                       "Need BLUETOOTH PRIVILEGED permission");
        DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
        if (deviceProp == null || deviceProp.getBondState() != BluetoothDevice.BOND_BONDING) {
            return false;