Fix crash with location provider
This commit is contained in:
parent
0962f6fdc8
commit
75a9acce67
1 changed files with 1 additions and 0 deletions
|
@ -869,6 +869,7 @@ public class OsmAndLocationProvider implements SensorEventListener {
|
|||
}
|
||||
|
||||
public net.osmand.Location getLastKnownLocation() {
|
||||
net.osmand.Location location = this.location;
|
||||
if (location != null && locationRequestsCounter == 0
|
||||
&& System.currentTimeMillis() - location.getTime() > STALE_LOCATION_TIMEOUT) {
|
||||
location = null;
|
||||
|
|
Loading…
Reference in a new issue