Loading core/java/android/preference/Preference.java +9 −1 Original line number Diff line number Diff line Loading @@ -1312,10 +1312,18 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis mDefaultValue = defaultValue; } /** * Returns whether the preference can be found in persistent storage * @hide */ protected boolean isPersisted() { return getSharedPreferences().contains(mKey); } private void dispatchSetInitialValue() { // By now, we know if we are persistent. final boolean shouldPersist = shouldPersist(); if (!shouldPersist || !getSharedPreferences().contains(mKey)) { if (!shouldPersist || !isPersisted()) { if (mDefaultValue != null) { onSetInitialValue(false, mDefaultValue); } Loading Loading
core/java/android/preference/Preference.java +9 −1 Original line number Diff line number Diff line Loading @@ -1312,10 +1312,18 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis mDefaultValue = defaultValue; } /** * Returns whether the preference can be found in persistent storage * @hide */ protected boolean isPersisted() { return getSharedPreferences().contains(mKey); } private void dispatchSetInitialValue() { // By now, we know if we are persistent. final boolean shouldPersist = shouldPersist(); if (!shouldPersist || !getSharedPreferences().contains(mKey)) { if (!shouldPersist || !isPersisted()) { if (mDefaultValue != null) { onSetInitialValue(false, mDefaultValue); } Loading