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

Commit 7cc30152 authored by Sherry Zhou's avatar Sherry Zhou
Browse files

Fix Transit clock showing wrong color in multi-crop preview

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

Change-Id: I0f54e916f2c47b8dc52628a3f9dbcc226ae3e87b
parent a036797e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -617,7 +617,9 @@ constructor(
    }

    private suspend fun updateClockAppearance(clock: ClockController) {
        if (!MigrateClocksToBlueprint.isEnabled) {
            clockController.clock = clock
        }
        val colors = wallpaperColors
        if (clockRegistry.seedColor == null && colors != null) {
            // Seed color null means users do not override any color on the clock. The default
@@ -635,6 +637,11 @@ constructor(
                if (isWallpaperDark) lightClockColor else darkClockColor
            )
        }
        // In clock preview, we should have a seed color for clock
        // before setting clock to clockEventController to avoid updateColor with seedColor == null
        if (MigrateClocksToBlueprint.isEnabled) {
            clockController.clock = clock
        }
    }
    private fun onClockChanged() {
        if (MigrateClocksToBlueprint.isEnabled) {