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

Commit 8cb34020 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Reset permissions for not bonded device" into tm-dev am: b841430f am: 10ccd295

parents eeab8ff5 10ccd295
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -463,6 +463,13 @@ final class BondStateMachine extends StateMachine {
            }
        }

        if (newState == BluetoothDevice.BOND_NONE) {
            // Remove the permissions for unbonded devices
            mAdapterService.setMessageAccessPermission(device, BluetoothDevice.ACCESS_UNKNOWN);
            mAdapterService.setPhonebookAccessPermission(device, BluetoothDevice.ACCESS_UNKNOWN);
            mAdapterService.setSimAccessPermission(device, BluetoothDevice.ACCESS_UNKNOWN);
        }

        Intent intent = new Intent(BluetoothDevice.ACTION_BOND_STATE_CHANGED);
        intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
        intent.putExtra(BluetoothDevice.EXTRA_BOND_STATE, newState);