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

Commit 366d126d authored by shawnlin's avatar shawnlin
Browse files

Fixed clock face resetting to default one after rebooting

The root cause is that the initial clock plugin was set before the onPluginConnected() was
called.

Set the clock plugin once the onPluginConnected() is called and it's
current clock plugin.

Bug: 131044332
Test: manual
Change-Id: I133183d66db05620d6da77abb0643e8e5ee60ebc
parent d9919f27
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -289,12 +289,19 @@ public final class ClockManager {
        public void onPluginConnected(ClockPlugin plugin, Context pluginContext) {
            addClockPlugin(plugin);
            reload();
            if (plugin == mCurrentClock) {
                ClockManager.this.reload();
            }
        }

        @Override
        public void onPluginDisconnected(ClockPlugin plugin) {
            boolean isCurrentClock = plugin == mCurrentClock;
            removeClockPlugin(plugin);
            reload();
            if (isCurrentClock) {
                ClockManager.this.reload();
            }
        }

        /**