Merge change I43f72dd1 into eclair

* changes:
  Don't block TIME_TICK broadcasts in the DigitalClock widget.
This commit is contained in:
Android (Google) Code Review
2009-11-23 08:39:24 -08:00

View File

@ -61,8 +61,13 @@ public class DigitalClock extends LinearLayout {
Intent.ACTION_TIMEZONE_CHANGED)) { Intent.ACTION_TIMEZONE_CHANGED)) {
mCalendar = Calendar.getInstance(); mCalendar = Calendar.getInstance();
} }
// Post a runnable to avoid blocking the broadcast.
mHandler.post(new Runnable() {
public void run() {
updateTime(); updateTime();
} }
});
}
}; };
static class AmPm { static class AmPm {
@ -133,7 +138,7 @@ public class DigitalClock extends LinearLayout {
filter.addAction(Intent.ACTION_TIME_TICK); filter.addAction(Intent.ACTION_TIME_TICK);
filter.addAction(Intent.ACTION_TIME_CHANGED); filter.addAction(Intent.ACTION_TIME_CHANGED);
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED); filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
mContext.registerReceiver(mIntentReceiver, filter, null, mHandler); mContext.registerReceiver(mIntentReceiver, filter);
} }
/* monitor 12/24-hour display preference */ /* monitor 12/24-hour display preference */