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

Commit e1b61141 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Notify ClockChangedListeners on main thread"

parents 7da74284 c64a3fef
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));
            }
        });
    }