From c4938fd6190e04a454e8a10d4cba95ab6b805e71 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Wed, 28 Apr 2010 13:20:43 -0700 Subject: [PATCH] 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 --- services/java/com/android/server/status/StatusBarPolicy.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java index 82050ecb580e0..94d1cb4924943 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)) {