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

Commit f60e108f authored by Daniel Sandler's avatar Daniel Sandler
Browse files

Don't block TIME_TICK broadcasts in the DigitalClock widget.

This change applies the fix -- originally by phanna in
https://android-git.corp.google.com/g/#change,33669 -- to
the com.android.internal.widget version of DigitalClock,
which is used by the keyguard and pattern lock screens.

Change-Id: I43f72dd144423e55f73ba52903d52163c8f65591
parent 2a6a149f
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -61,8 +61,13 @@ public class DigitalClock extends LinearLayout {
                            Intent.ACTION_TIMEZONE_CHANGED)) {
                    mCalendar = Calendar.getInstance();
                }
                // Post a runnable to avoid blocking the broadcast.
                mHandler.post(new Runnable() {
                        public void run() {
                            updateTime();
                        }
                });
            }
        };

    static class AmPm {
@@ -133,7 +138,7 @@ public class DigitalClock extends LinearLayout {
            filter.addAction(Intent.ACTION_TIME_TICK);
            filter.addAction(Intent.ACTION_TIME_CHANGED);
            filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
            mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
            mContext.registerReceiver(mIntentReceiver, filter);
        }

        /* monitor 12/24-hour display preference */