1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-28 11:35:48 +01:00

Bangle.js: Fix location listener not being cleaned up when waiting for reconnect

This commit is contained in:
Martin Boonk 2023-05-18 14:16:44 +02:00 committed by José Rebelo
parent 3f87bfadd4
commit a57a8cc7ca

View File

@ -236,7 +236,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
LOG.info("ACTION_DEVICE_CHANGED " + stateString);
addReceiveHistory("\n================================================\nACTION_DEVICE_CHANGED "+stateString+" "+(new SimpleDateFormat("yyyy-mm-dd hh:mm:ss", Locale.US)).format(Calendar.getInstance().getTime())+"\n================================================\n");
}
if (gbDevice!=null && gbDevice.getState() == GBDevice.State.NOT_CONNECTED) {
if (gbDevice!=null && (gbDevice.getState() == GBDevice.State.NOT_CONNECTED || gbDevice.getState() == GBDevice.State.WAITING_FOR_RECONNECT)) {
stopLocationUpdate();
}
}