summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Amith Yamasani <yamasani@google.com> 2010-04-28 13:20:43 -0700
committer Amith Yamasani <yamasani@google.com> 2010-04-28 13:20:43 -0700
commitc4938fd6190e04a454e8a10d4cba95ab6b805e71 (patch)
treeb7cee0dd0c3b8280e1282fefa4cc237a0434d54e
parent19681af44b7c7494ae8de28dab8aacc3e9d92390 (diff)
Make timezone changes apply to status bar time in 24hr mode. Bug: 2632681
The SimpleDateFormat was being cached and new timezone not being applied. Make sure to apply the new timezone to the format object as soon as it changes. Change-Id: I72abfef2e14cf5db5a6e8cb71b053380b695495c
-rw-r--r--services/java/com/android/server/status/StatusBarPolicy.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java
index 82050ecb580e..94d1cb492494 100644
--- a/services/java/com/android/server/status/StatusBarPolicy.java
+++ b/services/java/com/android/server/status/StatusBarPolicy.java
@@ -361,6 +361,9 @@ public class StatusBarPolicy {
else if (action.equals(Intent.ACTION_TIMEZONE_CHANGED)) {
String tz = intent.getStringExtra("time-zone");
mCalendar = Calendar.getInstance(TimeZone.getTimeZone(tz));
+ if (mClockFormat != null) {
+ mClockFormat.setTimeZone(mCalendar.getTimeZone());
+ }
updateClock();
}
else if (action.equals(Intent.ACTION_ALARM_CHANGED)) {