From 9f5664b87614d230e181cf0043396b55a38000c1 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Thu, 10 Oct 2013 09:03:19 -0700 Subject: [PATCH] NotificationPanel now shows correct date There was a problem with a cached instance of a Date object such that it would retain information about the default TimeZone that was not updated when the TimeZone was set to the correct value. This resulted in NotificationPanel sometimes showing the wrong date, based on the time and the delta between the local timezone and GMT. The fix is to use an ACTION_TIMEZONE_CHANGED broadcast to recreate the cached Date object appropriately. Issue #10854196 Incorrect date showing in notification shade Change-Id: Ibf883e1ff37f4d0aae6840fb19e43e7e9e45bcc2 --- .../src/com/android/systemui/statusbar/policy/DateView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java index 16e2e079d2ab5..b7f3cfe9ce164 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java @@ -50,7 +50,8 @@ public class DateView extends TextView { || Intent.ACTION_TIME_CHANGED.equals(action) || Intent.ACTION_TIMEZONE_CHANGED.equals(action) || Intent.ACTION_LOCALE_CHANGED.equals(action)) { - if (Intent.ACTION_LOCALE_CHANGED.equals(action)) { + if (Intent.ACTION_LOCALE_CHANGED.equals(action) + || Intent.ACTION_TIMEZONE_CHANGED.equals(action)) { // need to get a fresh date format mDateFormat = null; }