Add small fixes

This commit is contained in:
Alexander Sytnyk 2017-07-21 13:55:18 +03:00
parent 07844c49e5
commit 3565cc8d44
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;