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

Commit ab8b9f12 authored by Yuyang Huang's avatar Yuyang Huang Committed by Automerger Merge Worker
Browse files

Merge "Remove bond at the beginning of factoryReset" into main am: 902b5d0a am: 72a288ea

parents 9b42f9d9 72a288ea
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -166,6 +166,11 @@ class Host(
        grpcUnary<Empty>(scope, responseObserver, 30) {
            Log.i(TAG, "factoryReset")

            // remove bond for each device to avoid auto connection if remote resets faster
            for (device in bluetoothAdapter.bondedDevices) {
                device.removeBond()
            }

            val stateFlow =
                flow
                    .filter { it.getAction() == BluetoothAdapter.ACTION_STATE_CHANGED }