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

Commit 280826c3 authored by Robert Snoeberger's avatar Robert Snoeberger Committed by android-build-merger
Browse files

Merge "Notify ClockChangedListeners on main thread"

am: e1b61141

Change-Id: I873723bc656c8a2199a015d8793f5673ce2911dc
parents f17c2e2e e1b61141
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));
            }
        });
    }