Add small fixes

This commit is contained in:
Alexander Sytnyk 2017-07-21 13:55:18 +03:00
parent fd19f2c505
commit 71c69860df
2 changed files with 3 additions and 2 deletions

View file

@ -792,7 +792,8 @@ public class MapControlsLayer extends OsmandMapLayer {
}
private void updateMyLocation(RoutingHelper rh, boolean dialogOpened) {
boolean enabled = !isLocationOutdated(mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation());
boolean enabled = mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation() != null &&
!isLocationOutdated(mapActivity.getMyApplication().getLocationProvider().getLastKnownLocation());
boolean tracked = mapActivity.getMapViewTrackingUtilities().isMapLinkedToLocation();
if (!enabled) {

View file

@ -40,7 +40,7 @@ import gnu.trove.list.array.TIntArrayList;
public abstract class OsmandMapLayer {
protected static final int UPDATES_BEFORE_CHECK_LOCATION = 20;
protected static final int UPDATES_BEFORE_CHECK_LOCATION = 40;
protected List<LatLon> fullObjectsLatLon;
protected List<LatLon> smallObjectsLatLon;