mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 12:56:49 +01:00
javadoc
This commit is contained in:
parent
e35ce978bd
commit
47984dba0a
@ -19,10 +19,6 @@ public class Prefs {
|
|||||||
this.preferences = preferences;
|
this.preferences = preferences;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SharedPreferences getPreferences() {
|
|
||||||
return preferences;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getString(String key, String defaultValue) {
|
public String getString(String key, String defaultValue) {
|
||||||
String value = preferences.getString(key, defaultValue);
|
String value = preferences.getString(key, defaultValue);
|
||||||
if (value == null || "".equals(value)) {
|
if (value == null || "".equals(value)) {
|
||||||
@ -110,4 +106,12 @@ public class Prefs {
|
|||||||
private void logReadError(String key, Exception ex) {
|
private void logReadError(String key, Exception ex) {
|
||||||
LOG.error("Error reading preference value: " + key + "; returning default value", ex); // log the first exception
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user