Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6bcd8f6 authored by Jorge Ruesga's avatar Jorge Ruesga
Browse files

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: I3798f2631163a89519220b87665a62e7c3ed4eb1
parent 5852c191
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 {