Add check for "setLocation(null)"

This commit is contained in:
Alex Sytnyk 2018-05-25 18:32:46 +03:00
parent 17f4dfb7c4
commit ae2df017ef

View file

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