Android Statusbar Clock Widget - 12/24-hr Settings Update Delay

If you change the time zone in android, the Android widget clock will update immediately.

However, if you change the display time from 12 to 24-hr, or vice versa, the widget clock will not update until the next minute ticks by.

The relevant class, com.android.systemui.statusbar.Clock, seems to listen for these intents
Intent.ACTION_TIME_TICK
Intent.ACTION_TIME_CHANGED
Intent.ACTION_TIMEZONE_CHANGED
Intent.ACTION_CONFIGURATION_CHANGED
None of these must get fired when you change the 12/24-hr clock setting.
Why would it matter? I wanted a automated test that would compare the text displayed on the statusbar clock to a value displayed in an app's textview, after the 12/24-hr setting had been changed outside of the app. The one minute delay affects how the test should be constructed...

No comments:

Post a Comment

Popular Posts