Fix check for "setLocation(null)"

This commit is contained in:
Alex Sytnyk 2018-05-25 18:40:28 +03:00
parent ae2df017ef
commit 27b88ea389

View file

@ -704,13 +704,12 @@ public class OsmAndLocationProvider implements SensorEventListener {
return;
}
gpsSignalLost = true;
if (routingHelper.isFollowingMode() && routingHelper.getLeftDistance() > 0) {
if (routingHelper.isFollowingMode() && routingHelper.getLeftDistance() > 0
&& simulatePosition == null) {
routingHelper.getVoiceRouter().gpsLocationLost();
if (simulatePosition == null) {
setLocation(null);
}
}
}
}, LOST_LOCATION_CHECK_DELAY);
app.runMessageInUIThreadAndCancelPrevious(START_SIMULATE_LOCATION_MSG_ID, new Runnable() {