notify preference change listeners

This commit is contained in:
Sergey Solovyev 2011-09-22 15:20:52 +04:00
parent ddd18dc8d5
commit b4749e3e91

View File

@ -116,6 +116,7 @@ public abstract class AbstractDialogPreference<T> extends DialogPreference {
protected abstract void initPreferenceView(); protected abstract void initPreferenceView();
@Nullable
private T getPersistedValue() { private T getPersistedValue() {
String persistedString = getPersistedString(defaultStringValue); String persistedString = getPersistedString(defaultStringValue);
if ( persistedString == defaultStringValue ) { if ( persistedString == defaultStringValue ) {
@ -137,6 +138,7 @@ public abstract class AbstractDialogPreference<T> extends DialogPreference {
final String toBePersistedString = getMapper().formatValue(value); final String toBePersistedString = getMapper().formatValue(value);
if (toBePersistedString != null) { if (toBePersistedString != null) {
persistString(toBePersistedString); persistString(toBePersistedString);
callChangeListener(value);
} }
} }