Update CommonPreference.java
This commit is contained in:
parent
6e40cd7913
commit
e05aab4211
1 changed files with 1 additions and 9 deletions
|
@ -89,7 +89,6 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
defaultValues.put(mode, defValue);
|
defaultValues.put(mode, defValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO final
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setModeValue(ApplicationMode mode, T obj) {
|
public boolean setModeValue(ApplicationMode mode, T obj) {
|
||||||
if (global) {
|
if (global) {
|
||||||
|
@ -106,7 +105,6 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
return valueSaved;
|
return valueSaved;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO final
|
|
||||||
public T getProfileDefaultValue(ApplicationMode mode) {
|
public T getProfileDefaultValue(ApplicationMode mode) {
|
||||||
if (global) {
|
if (global) {
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
|
@ -129,7 +127,6 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
return defaultValues != null && defaultValues.containsKey(mode);
|
return defaultValues != null && defaultValues.containsKey(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO final
|
|
||||||
protected T getDefaultValue() {
|
protected T getDefaultValue() {
|
||||||
return getProfileDefaultValue(settings.APPLICATION_MODE.get());
|
return getProfileDefaultValue(settings.APPLICATION_MODE.get());
|
||||||
}
|
}
|
||||||
|
@ -139,7 +136,6 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
this.defaultValue = newDefaultValue;
|
this.defaultValue = newDefaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO final
|
|
||||||
@Override
|
@Override
|
||||||
public T getModeValue(ApplicationMode mode) {
|
public T getModeValue(ApplicationMode mode) {
|
||||||
if (global) {
|
if (global) {
|
||||||
|
@ -149,7 +145,6 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
return getValue(settings.getProfilePreferences(mode), defaultV);
|
return getValue(settings.getProfilePreferences(mode), defaultV);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO final
|
|
||||||
@Override
|
@Override
|
||||||
public T get() {
|
public T get() {
|
||||||
if (cache && cachedValue != null && cachedPreference == getPreferences()) {
|
if (cache && cachedValue != null && cachedPreference == getPreferences()) {
|
||||||
|
@ -181,7 +176,6 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO final
|
|
||||||
@Override
|
@Override
|
||||||
public boolean set(T obj) {
|
public boolean set(T obj) {
|
||||||
Object prefs = getPreferences();
|
Object prefs = getPreferences();
|
||||||
|
@ -210,7 +204,6 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
return shared;
|
return shared;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO final
|
|
||||||
@Override
|
@Override
|
||||||
public boolean writeToJson(JSONObject json, ApplicationMode appMode) throws JSONException {
|
public boolean writeToJson(JSONObject json, ApplicationMode appMode) throws JSONException {
|
||||||
if (appMode != null) {
|
if (appMode != null) {
|
||||||
|
@ -231,7 +224,6 @@ public abstract class CommonPreference<T> extends PreferenceWithListener<T> {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO final
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromJson(JSONObject json, ApplicationMode appMode) throws JSONException {
|
public void readFromJson(JSONObject json, ApplicationMode appMode) throws JSONException {
|
||||||
if (appMode != null) {
|
if (appMode != null) {
|
||||||
|
|
Loading…
Reference in a new issue