am 1a1e9b31: Merge "DateView: Use Intent.ACTION_LOCALE_CHANGED to refresh notification bar clock"
# By Jorge Ruesga # Via Gerrit Code Review (1) and Jorge Ruesga (1) * commit '1a1e9b317ac2d737ad92a35c4d806f0fda1ede70': DateView: Use Intent.ACTION_LOCALE_CHANGED to refresh notification bar clock
This commit is contained in:
@@ -43,7 +43,8 @@ public class DateView extends TextView {
|
|||||||
final String action = intent.getAction();
|
final String action = intent.getAction();
|
||||||
if (Intent.ACTION_TIME_TICK.equals(action)
|
if (Intent.ACTION_TIME_TICK.equals(action)
|
||||||
|| Intent.ACTION_TIME_CHANGED.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();
|
updateClock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,6 +117,7 @@ public class DateView extends TextView {
|
|||||||
filter.addAction(Intent.ACTION_TIME_TICK);
|
filter.addAction(Intent.ACTION_TIME_TICK);
|
||||||
filter.addAction(Intent.ACTION_TIME_CHANGED);
|
filter.addAction(Intent.ACTION_TIME_CHANGED);
|
||||||
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
|
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
|
||||||
|
filter.addAction(Intent.ACTION_LOCALE_CHANGED);
|
||||||
mContext.registerReceiver(mIntentReceiver, filter, null, null);
|
mContext.registerReceiver(mIntentReceiver, filter, null, null);
|
||||||
updateClock();
|
updateClock();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user