From 96605b8cb205a4672de7e6756a903f8e31734d73 Mon Sep 17 00:00:00 2001 From: Pavol Zibrita Date: Thu, 7 Apr 2011 01:02:36 +0200 Subject: [PATCH] Fixed issue 307 by selecting Passive location provider in DayNightHelper. Also added launcher for OsmAndMapCreator in eclipse --- DataExtractionOSM/OsmAndMapCreator.launch | 15 +++++++++++++++ .../src/net/osmand/activities/DayNightHelper.java | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 DataExtractionOSM/OsmAndMapCreator.launch diff --git a/DataExtractionOSM/OsmAndMapCreator.launch b/DataExtractionOSM/OsmAndMapCreator.launch new file mode 100644 index 0000000000..9f17169cf9 --- /dev/null +++ b/DataExtractionOSM/OsmAndMapCreator.launch @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/OsmAnd/src/net/osmand/activities/DayNightHelper.java b/OsmAnd/src/net/osmand/activities/DayNightHelper.java index d481628ba6..b38831384b 100644 --- a/OsmAnd/src/net/osmand/activities/DayNightHelper.java +++ b/OsmAnd/src/net/osmand/activities/DayNightHelper.java @@ -83,7 +83,7 @@ public class DayNightHelper implements SensorEventListener { try { LocationManager locationProvider = (LocationManager) osmandApplication.getSystemService(Context.LOCATION_SERVICE); // Or use LocationManager.GPS_PROVIDER - Location lastKnownLocation = locationProvider.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); + Location lastKnownLocation = locationProvider.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER); if(lastKnownLocation == null){ return null; }