diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/Prefs.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/Prefs.java index fcb49112..7c2fc2b1 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/Prefs.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/Prefs.java @@ -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; + } }