mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Stop BangleJSDeviceSupport repeatedly calling GBLocationManager.stop and spamming the log with "Stop location updates"
This commit is contained in:
+4
-1
@@ -155,7 +155,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
|
||||
private final LimitedQueue/*Long*/ mNotificationReplyAction = new LimitedQueue(16);
|
||||
|
||||
private Boolean gpsUpdateSetup = false;
|
||||
private boolean gpsUpdateSetup = false;
|
||||
private Timer gpsPositionTimer;
|
||||
private final int gpsUpdateTimerInterval = 1000;
|
||||
|
||||
@@ -200,6 +200,8 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
|
||||
|
||||
private void stopLocationUpdate() {
|
||||
if (!gpsUpdateSetup)
|
||||
return;
|
||||
LOG.info("Stop location updates");
|
||||
GBLocationManager.stop(getContext(), this);
|
||||
gpsUpdateSetup = false;
|
||||
@@ -968,6 +970,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
|
||||
} else {
|
||||
GB.toast("Phone gps data update is deactivated in the settings", Toast.LENGTH_SHORT, GB.INFO);
|
||||
}
|
||||
gpsUpdateSetup = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user