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

Commit 10ccd295 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

parents c66b3932 b841430f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -439,6 +439,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);