1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-02 03:16:07 +02:00

Disconnect all devices that are not NOT_CONNECTED

Disconnect devices in all states except GBDevice.State.NOT_CONNECTED.
This should fix devices getting stuck in GBDevice.State.CONNECTING state
when Bluetooth is switched off.
This commit is contained in:
Davis Mosenkovs 2024-01-04 20:24:12 +02:00 committed by José Rebelo
parent 9e10da062e
commit 5bcebe9590

View File

@ -598,6 +598,8 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
}
notifCache.removeAll(toRemove);
}
} else if (action.equals(ACTION_DISCONNECT) && device.getState() != GBDevice.State.NOT_CONNECTED) {
targetedDevices.add(device);
}
}
}