Loading src/com/android/alarmclock/DigitalWidgetViewsFactory.java +4 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,10 @@ public class DigitalWidgetViewsFactory extends BroadcastReceiver implements Remo refreshAlarm(context, widget); widgetManager.partiallyUpdateAppWidget(mId, widget); } else { if (action.equals(Intent.ACTION_TIMEZONE_CHANGED)) { // refresh the list to make sure home time zone is displayed / removed. mReloadCitiesList = true; } // For any time change or locale change, refresh all widgetManager.notifyAppWidgetViewDataChanged(mId, R.id.digital_appwidget_listview); RemoteViews widget = Loading src/com/android/deskclock/SettingsActivity.java +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.deskclock; import android.app.ActionBar; import android.content.Intent; import android.content.res.Resources; import android.media.AudioManager; import android.os.Bundle; Loading @@ -30,6 +31,8 @@ import android.text.format.DateUtils; import android.view.Menu; import android.view.MenuItem; import com.android.deskclock.worldclock.Cities; import java.util.TimeZone; /** Loading Loading @@ -156,10 +159,12 @@ public class SettingsActivity extends PreferenceActivity final ListPreference listPref = (ListPreference) pref; final int idx = listPref.findIndexOfValue((String) newValue); listPref.setSummary(listPref.getEntries()[idx]); notifyHomeTimeZoneChanged(); } else if (KEY_AUTO_HOME_CLOCK.equals(pref.getKey())) { boolean state =((CheckBoxPreference) pref).isChecked(); Preference homeTimeZone = findPreference(KEY_HOME_TZ); homeTimeZone.setEnabled(!state); notifyHomeTimeZoneChanged(); } else if (KEY_VOLUME_BUTTONS.equals(pref.getKey())) { final ListPreference listPref = (ListPreference) pref; final int idx = listPref.findIndexOfValue((String) newValue); Loading @@ -178,6 +183,12 @@ public class SettingsActivity extends PreferenceActivity } } private void notifyHomeTimeZoneChanged() { Intent i = new Intent(Cities.WORLDCLOCK_UPDATE_INTENT); sendBroadcast(i); } private void refresh() { ListPreference listPref = (ListPreference) findPreference(KEY_AUTO_SILENCE); String delay = listPref.getValue(); Loading Loading
src/com/android/alarmclock/DigitalWidgetViewsFactory.java +4 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,10 @@ public class DigitalWidgetViewsFactory extends BroadcastReceiver implements Remo refreshAlarm(context, widget); widgetManager.partiallyUpdateAppWidget(mId, widget); } else { if (action.equals(Intent.ACTION_TIMEZONE_CHANGED)) { // refresh the list to make sure home time zone is displayed / removed. mReloadCitiesList = true; } // For any time change or locale change, refresh all widgetManager.notifyAppWidgetViewDataChanged(mId, R.id.digital_appwidget_listview); RemoteViews widget = Loading
src/com/android/deskclock/SettingsActivity.java +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.deskclock; import android.app.ActionBar; import android.content.Intent; import android.content.res.Resources; import android.media.AudioManager; import android.os.Bundle; Loading @@ -30,6 +31,8 @@ import android.text.format.DateUtils; import android.view.Menu; import android.view.MenuItem; import com.android.deskclock.worldclock.Cities; import java.util.TimeZone; /** Loading Loading @@ -156,10 +159,12 @@ public class SettingsActivity extends PreferenceActivity final ListPreference listPref = (ListPreference) pref; final int idx = listPref.findIndexOfValue((String) newValue); listPref.setSummary(listPref.getEntries()[idx]); notifyHomeTimeZoneChanged(); } else if (KEY_AUTO_HOME_CLOCK.equals(pref.getKey())) { boolean state =((CheckBoxPreference) pref).isChecked(); Preference homeTimeZone = findPreference(KEY_HOME_TZ); homeTimeZone.setEnabled(!state); notifyHomeTimeZoneChanged(); } else if (KEY_VOLUME_BUTTONS.equals(pref.getKey())) { final ListPreference listPref = (ListPreference) pref; final int idx = listPref.findIndexOfValue((String) newValue); Loading @@ -178,6 +183,12 @@ public class SettingsActivity extends PreferenceActivity } } private void notifyHomeTimeZoneChanged() { Intent i = new Intent(Cities.WORLDCLOCK_UPDATE_INTENT); sendBroadcast(i); } private void refresh() { ListPreference listPref = (ListPreference) findPreference(KEY_AUTO_SILENCE); String delay = listPref.getValue(); Loading