mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 19:36:50 +01:00
Bangle.js: Fix location listener not being cleaned up when waiting for reconnect
This commit is contained in:
parent
3f87bfadd4
commit
a57a8cc7ca
@ -236,7 +236,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
|||||||
LOG.info("ACTION_DEVICE_CHANGED " + stateString);
|
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");
|
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();
|
stopLocationUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user