From 47984dba0a4df7aaf7b42fb65e5cf6260d4bed34 Mon Sep 17 00:00:00 2001 From: cpfeiffer Date: Mon, 25 Apr 2016 23:45:27 +0200 Subject: [PATCH] javadoc --- .../freeyourgadget/gadgetbridge/util/Prefs.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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; + } }