diff options
Diffstat (limited to 'src/com/android/settings/DateTimeSettings.java')
-rw-r--r-- | src/com/android/settings/DateTimeSettings.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/settings/DateTimeSettings.java b/src/com/android/settings/DateTimeSettings.java index 1b9fecb..d6e85c4 100644 --- a/src/com/android/settings/DateTimeSettings.java +++ b/src/com/android/settings/DateTimeSettings.java @@ -109,14 +109,14 @@ public class DateTimeSettings mTimePref.setEnabled(!autoEnabled); mDatePref.setEnabled(!autoEnabled); mTimeZone.setEnabled(!autoEnabled); - - getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this); } @Override protected void onResume() { super.onResume(); + + getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this); ((CheckBoxPreference)mTime24Pref).setChecked(is24Hour()); @@ -134,6 +134,7 @@ public class DateTimeSettings protected void onPause() { super.onPause(); unregisterReceiver(mIntentReceiver); + getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this); } private void updateTimeAndDateDisplay() { |