aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/compatibility
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2011-10-03 13:47:07 +0200
committerBananeweizen <bananeweizen@gmx.de>2011-10-03 13:47:07 +0200
commitf52b1f0c1a58978efd5e8478f29484cb1f3b421e (patch)
tree39080018d83b12407a7df47153431464173e5e19 /main/src/cgeo/geocaching/compatibility
parente99ed4d71470da9efe59f4b363762d105dbfdc6d (diff)
downloadcgeo-f52b1f0c1a58978efd5e8478f29484cb1f3b421e.zip
cgeo-f52b1f0c1a58978efd5e8478f29484cb1f3b421e.tar.gz
cgeo-f52b1f0c1a58978efd5e8478f29484cb1f3b421e.tar.bz2
fix #120: make settings static (no singleton)
* Settings can no longer be instantiated, everything is static instead. * Most option values are no longer cached in fields. This has been done for clarity during the refactoring. I will add some performance tests afterwards and may re-introduce those fields for caching the option values. Sorry, if anyone gets merge issues afterwards. There was no easier way to implement this...
Diffstat (limited to 'main/src/cgeo/geocaching/compatibility')
-rw-r--r--main/src/cgeo/geocaching/compatibility/AndroidLevel8.java4
-rw-r--r--main/src/cgeo/geocaching/compatibility/Compatibility.java8
2 files changed, 6 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/compatibility/AndroidLevel8.java b/main/src/cgeo/geocaching/compatibility/AndroidLevel8.java
index 4b7fd62..259cb5c 100644
--- a/main/src/cgeo/geocaching/compatibility/AndroidLevel8.java
+++ b/main/src/cgeo/geocaching/compatibility/AndroidLevel8.java
@@ -1,6 +1,6 @@
package cgeo.geocaching.compatibility;
-import cgeo.geocaching.cgSettings;
+import cgeo.geocaching.Settings;
import android.app.Activity;
import android.app.backup.BackupManager;
@@ -15,7 +15,7 @@ public class AndroidLevel8 {
}
static public void dataChanged(final String name) {
- Log.i(cgSettings.tag, "Requesting settings backup with settings manager");
+ Log.i(Settings.tag, "Requesting settings backup with settings manager");
BackupManager.dataChanged(name);
}
}
diff --git a/main/src/cgeo/geocaching/compatibility/Compatibility.java b/main/src/cgeo/geocaching/compatibility/Compatibility.java
index 72aa4c8..ef2f883 100644
--- a/main/src/cgeo/geocaching/compatibility/Compatibility.java
+++ b/main/src/cgeo/geocaching/compatibility/Compatibility.java
@@ -1,6 +1,6 @@
package cgeo.geocaching.compatibility;
-import cgeo.geocaching.cgSettings;
+import cgeo.geocaching.Settings;
import android.app.Activity;
import android.content.res.Configuration;
@@ -28,7 +28,7 @@ public final class Compatibility {
getRotationMethod = cl.getDeclaredMethod("getRotation", Activity.class);
} catch (final Exception e) {
// Exception can be ClassNotFoundException, SecurityException or NoSuchMethodException
- Log.e(cgSettings.tag, "Cannot load AndroidLevel8 class", e);
+ Log.e(Settings.tag, "Cannot load AndroidLevel8 class", e);
}
}
}
@@ -47,7 +47,7 @@ public final class Compatibility {
}
} catch (final Exception e) {
// This should never happen: IllegalArgumentException, IllegalAccessException or InvocationTargetException
- Log.e(cgSettings.tag, "Cannot call getRotation()", e);
+ Log.e(Settings.tag, "Cannot call getRotation()", e);
}
} else {
final Display display = activity.getWindowManager()
@@ -74,7 +74,7 @@ public final class Compatibility {
dataChangedMethod.invoke(null, name);
} catch (final Exception e) {
// This should never happen: IllegalArgumentException, IllegalAccessException or InvocationTargetException
- Log.e(cgSettings.tag, "Cannot call dataChanged()", e);
+ Log.e(Settings.tag, "Cannot call dataChanged()", e);
}
}
}