am a59a01ab: Merge change I43f72dd1 into eclair

Merge commit 'a59a01ab2b959a8a5aeb09dd664d5be193fd8219' into eclair-mr2

* commit 'a59a01ab2b959a8a5aeb09dd664d5be193fd8219':
  Don't block TIME_TICK broadcasts in the DigitalClock widget.
This commit is contained in:
Daniel Sandler
2009-11-23 08:44:27 -08:00
committed by Android Git Automerger

View File

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