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

Commit 8ba22ef9 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Make sure state is set, even if receiver fails

parent 282ce270
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -72,12 +72,12 @@ public class WiFiBackendHelper {
    public void onClose() {
        if (state == State.DISABLED || state == State.DISABLING)
            throw new IllegalStateException("Do not call onClose if not opened before");
        context.unregisterReceiver(wifiBroadcastReceiver);
        if (state == State.WAITING) {
            state = State.DISABLED;
        } else {
            state = State.DISABLING;
        }
        context.unregisterReceiver(wifiBroadcastReceiver);
    }

    public void onUpdate() {