This commit is contained in:
cpfeiffer
2016-04-25 23:45:27 +02:00
parent e35ce978bd
commit 47984dba0a

View File

@@ -19,10 +19,6 @@ public class Prefs {
this.preferences = preferences;
}
public SharedPreferences getPreferences() {
return preferences;
}
public String getString(String key, String defaultValue) {
String value = preferences.getString(key, defaultValue);
if (value == null || "".equals(value)) {
@@ -110,4 +106,12 @@ public class Prefs {
private void logReadError(String key, Exception ex) {
LOG.error("Error reading preference value: " + key + "; returning default value", ex); // log the first exception
}
/**
* Access to the underlying SharedPreferences, typically only used for editing values.
* @return the underlying SharedPreferences object.
*/
public SharedPreferences getPreferences() {
return preferences;
}
}