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

Commit 3d559cbd authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Notify ClockChangedListeners on main thread" am: e1b61141 am: 280826c3 am: 5b65d855

Change-Id: I5ce71a9dc64ceb04f5024e8432f731e53981dc4f
parents 24e2025e 5b65d855
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -244,11 +244,12 @@ public final class ClockManager {
        mPreviewClocks.reloadCurrentClock();
        mListeners.forEach((listener, clocks) -> {
            clocks.reloadCurrentClock();
            ClockPlugin clock = clocks.getCurrentClock();
            if (clock instanceof DefaultClockController) {
                listener.onClockChanged(null);
            final ClockPlugin clock = clocks.getCurrentClock();
            if (Looper.myLooper() == Looper.getMainLooper()) {
                listener.onClockChanged(clock instanceof DefaultClockController ? null : clock);
            } else {
                listener.onClockChanged(clock);
                mMainHandler.post(() -> listener.onClockChanged(
                        clock instanceof DefaultClockController ? null : clock));
            }
        });
    }