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

Commit 18126be9 authored by Sherry Zhou's avatar Sherry Zhou
Browse files

Fix switching clock in picker not take effects on lockscreen

It's caused by distinctUntilChanged in currentClockId.
Same clock id will be sent by onCurrentClockChanged triggered in onPluginLoaded
which will not trigger currentClock to create new clock.

Test: manual
Flag: ACONFIG com.android.systemui.migrate_clocks_to_blueprint STAGING
Bug: 326925900

Change-Id: Id3e29cd947f6aa21e5f6fa34d0f1cadf35f8c1dc
parent f9c767d6
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapNotNull
import kotlinx.coroutines.flow.onStart
@@ -111,7 +110,6 @@ constructor(
                awaitClose { clockRegistry.unregisterClockChangeListener(listener) }
            }
            .mapNotNull { it }
            .distinctUntilChanged()

    override val currentClock: StateFlow<ClockController?> =
        currentClockId