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

Commit 5b65d855 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

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

Change-Id: I79165fd7192befd5a7b263529740ff20ca03f01c
parents f5877dcd 280826c3
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -243,11 +243,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));
            }
        });
    }