notify preference change listeners

This commit is contained in:
serso 2011-09-22 15:20:52 +04:00
parent 267c49d16c
commit 960391b5a4

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);
} }
} }