aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/sensors/GeoData.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/sensors/GeoData.java')
-rw-r--r--main/src/cgeo/geocaching/sensors/GeoData.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/sensors/GeoData.java b/main/src/cgeo/geocaching/sensors/GeoData.java
index 6739854..1291d3c 100644
--- a/main/src/cgeo/geocaching/sensors/GeoData.java
+++ b/main/src/cgeo/geocaching/sensors/GeoData.java
@@ -9,6 +9,8 @@ import android.location.LocationManager;
public class GeoData extends Location implements IGeoData {
public static final String INITIAL_PROVIDER = "initial";
+ public static final String FUSED_PROVIDER = "fused";
+ public static final String LOW_POWER_PROVIDER = "low-power";
public GeoData(final Location location) {
super(location);
@@ -27,9 +29,12 @@ public class GeoData extends Location implements IGeoData {
return LocationProviderType.NETWORK;
}
// LocationManager.FUSED_PROVIDER constant is not available at API level 9
- if (provider.equals("fused")) {
+ if (provider.equals(FUSED_PROVIDER)) {
return LocationProviderType.FUSED;
}
+ if (provider.equals(LOW_POWER_PROVIDER)) {
+ return LocationProviderType.LOW_POWER;
+ }
return LocationProviderType.LAST;
}