summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jorge Ruesga <j.ruesga.criado@gmail.com> 2012-09-19 00:24:05 +0200
committer Jorge Ruesga <j.ruesga.criado@gmail.com> 2012-09-19 00:24:05 +0200
commit46b369f09e7f0a9873a77312fdf49de937b97e69 (patch)
tree1540336d5eddebc1480505c5b42a8434789ca606
parent1e86994cd0e13f9084d3f4bd0060b9e34c935490 (diff)
DateView: Use Intent.ACTION_LOCALE_CHANGED to refresh notification bar clock
Add the Intent.ACTION_LOCALE_CHANGED to DateView BroadcastReceiver for detect when the user change the locale. Otherwise, the notification bar clock is not refreshed until the next tick or time changed occurs. Change-Id: Ic8830fbabf24b62b60a6d3babe5e211f14948d08
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java4
1 files changed, 3 insertions, 1 deletions
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 c19550bfb2af..1d3943ad5095 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
@@ -43,7 +43,8 @@ public final class DateView extends TextView {
final String action = intent.getAction();
if (Intent.ACTION_TIME_TICK.equals(action)
|| Intent.ACTION_TIME_CHANGED.equals(action)
- || Intent.ACTION_TIMEZONE_CHANGED.equals(action)) {
+ || Intent.ACTION_TIMEZONE_CHANGED.equals(action)
+ || Intent.ACTION_LOCALE_CHANGED.equals(action)) {
updateClock();
}
}
@@ -119,6 +120,7 @@ public final class DateView extends TextView {
filter.addAction(Intent.ACTION_TIME_TICK);
filter.addAction(Intent.ACTION_TIME_CHANGED);
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
+ filter.addAction(Intent.ACTION_LOCALE_CHANGED);
mContext.registerReceiver(mIntentReceiver, filter, null, null);
updateClock();
} else {