aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/settings/Settings.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/settings/Settings.java')
-rw-r--r--main/src/cgeo/geocaching/settings/Settings.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/main/src/cgeo/geocaching/settings/Settings.java b/main/src/cgeo/geocaching/settings/Settings.java
index 01ebd6f..fdcd94f 100644
--- a/main/src/cgeo/geocaching/settings/Settings.java
+++ b/main/src/cgeo/geocaching/settings/Settings.java
@@ -154,7 +154,6 @@ public class Settings {
e.putInt(getKey(R.string.pref_defaultNavigationTool2), old.getInt(getKey(R.string.pref_defaultNavigationTool2), NavigationAppsEnum.INTERNAL_MAP.id));
e.putInt(getKey(R.string.pref_livemapstrategy), old.getInt(getKey(R.string.pref_livemapstrategy), Strategy.AUTO.id));
e.putBoolean(getKey(R.string.pref_debug), old.getBoolean(getKey(R.string.pref_debug), false));
- e.putBoolean(getKey(R.string.pref_hidelivemaphint), old.getInt(getKey(R.string.pref_hidelivemaphint), 0) != 0);
e.putInt(getKey(R.string.pref_livemaphintshowcount), old.getInt(getKey(R.string.pref_livemaphintshowcount), 0));
e.putInt(getKey(R.string.pref_settingsversion), 1); // mark migrated
@@ -394,6 +393,14 @@ public class Settings {
return getString(R.string.pref_cookiestore, null);
}
+ public static boolean useGooglePlayServices() {
+ return CgeoApplication.getInstance().isGooglePlayServicesAvailable() && getBoolean(R.string.pref_googleplayservices, true);
+ }
+
+ public static boolean useLowPowerMode() {
+ return getBoolean(R.string.pref_lowpowermode, false);
+ }
+
/**
* @param cacheType
* The cache type used for future filtering
@@ -612,7 +619,7 @@ public class Settings {
mapSource = MapProviderFactory.getMapSource(id);
if (mapSource != null) {
// don't use offline maps if the map file is not valid
- if ((!(mapSource instanceof OfflineMapSource)) || (isValidMapFile())) {
+ if (!(mapSource instanceof OfflineMapSource) || isValidMapFile()) {
return mapSource;
}
}
@@ -835,14 +842,6 @@ public class Settings {
return Log.isDebug();
}
- public static boolean getHideLiveMapHint() {
- return getBoolean(R.string.pref_hidelivemaphint, false);
- }
-
- public static void setHideLiveHint(final boolean hide) {
- putBoolean(R.string.pref_hidelivemaphint, hide);
- }
-
public static int getLiveMapHintShowCount() {
return getInt(R.string.pref_livemaphintshowcount, 0);
}