Loading packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt +2 −4 Original line number Diff line number Diff line Loading @@ -106,10 +106,8 @@ class DefaultClockController( largeClock.animations = LargeClockAnimations(largeClock.view, dozeFraction, foldFraction) smallClock.animations = DefaultClockAnimations(smallClock.view, dozeFraction, foldFraction) val theme = ThemeConfig(isDarkTheme, settings?.seedColor) largeClock.events.onThemeChanged(theme) smallClock.events.onThemeChanged(theme) largeClock.events.onThemeChanged(largeClock.theme.copy(isDarkTheme = isDarkTheme)) smallClock.events.onThemeChanged(smallClock.theme.copy(isDarkTheme = isDarkTheme)) events.onTimeZoneChanged(TimeZone.getDefault()) smallClock.events.onTimeTick() Loading packages/SystemUI/customization/src/com/android/systemui/shared/clocks/FlexClockController.kt +2 −5 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import com.android.systemui.plugins.clocks.ClockController import com.android.systemui.plugins.clocks.ClockEvents import com.android.systemui.plugins.clocks.ClockFontAxis import com.android.systemui.plugins.clocks.ClockFontAxisSetting import com.android.systemui.plugins.clocks.ThemeConfig import com.android.systemui.plugins.clocks.WeatherData import com.android.systemui.plugins.clocks.ZenData import com.android.systemui.shared.clocks.view.FlexClockView Loading Loading @@ -107,18 +106,16 @@ class FlexClockController( } override fun initialize(isDarkTheme: Boolean, dozeFraction: Float, foldFraction: Float) { val theme = ThemeConfig(isDarkTheme, clockCtx.settings.seedColor) events.onFontAxesChanged(clockCtx.settings.axes) smallClock.run { events.onThemeChanged(theme) events.onThemeChanged(theme.copy(isDarkTheme = isDarkTheme)) animations.doze(dozeFraction) animations.fold(foldFraction) events.onTimeTick() } largeClock.run { events.onThemeChanged(theme) events.onThemeChanged(theme.copy(isDarkTheme = isDarkTheme)) animations.doze(dozeFraction) animations.fold(foldFraction) events.onTimeTick() Loading packages/SystemUI/customization/src/com/android/systemui/shared/clocks/FlexClockFaceController.kt +1 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ class FlexClockFaceController( } override fun onThemeChanged(theme: ThemeConfig) { this@FlexClockFaceController.theme = theme layerController.faceEvents.onThemeChanged(theme) } Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardClockViewBinder.kt +12 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,18 @@ object KeyguardClockViewBinder { } } disposables += keyguardRootView.repeatWhenAttached { repeatOnLifecycle(Lifecycle.State.STARTED) { viewModel.currentClock.collect { currentClock -> currentClock?.apply { smallClock.run { events.onThemeChanged(theme) } largeClock.run { events.onThemeChanged(theme) } } } } } return disposables } Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt +1 −0 Original line number Diff line number Diff line Loading @@ -680,6 +680,7 @@ constructor( } // In clock preview, we should have a seed color for clock // before setting clock to clockEventController to avoid updateColor with seedColor == null // So in update colors, it should already have the correct theme in clockFaceController if (MigrateClocksToBlueprint.isEnabled) { clockController.clock = clock } Loading Loading
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt +2 −4 Original line number Diff line number Diff line Loading @@ -106,10 +106,8 @@ class DefaultClockController( largeClock.animations = LargeClockAnimations(largeClock.view, dozeFraction, foldFraction) smallClock.animations = DefaultClockAnimations(smallClock.view, dozeFraction, foldFraction) val theme = ThemeConfig(isDarkTheme, settings?.seedColor) largeClock.events.onThemeChanged(theme) smallClock.events.onThemeChanged(theme) largeClock.events.onThemeChanged(largeClock.theme.copy(isDarkTheme = isDarkTheme)) smallClock.events.onThemeChanged(smallClock.theme.copy(isDarkTheme = isDarkTheme)) events.onTimeZoneChanged(TimeZone.getDefault()) smallClock.events.onTimeTick() Loading
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/FlexClockController.kt +2 −5 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import com.android.systemui.plugins.clocks.ClockController import com.android.systemui.plugins.clocks.ClockEvents import com.android.systemui.plugins.clocks.ClockFontAxis import com.android.systemui.plugins.clocks.ClockFontAxisSetting import com.android.systemui.plugins.clocks.ThemeConfig import com.android.systemui.plugins.clocks.WeatherData import com.android.systemui.plugins.clocks.ZenData import com.android.systemui.shared.clocks.view.FlexClockView Loading Loading @@ -107,18 +106,16 @@ class FlexClockController( } override fun initialize(isDarkTheme: Boolean, dozeFraction: Float, foldFraction: Float) { val theme = ThemeConfig(isDarkTheme, clockCtx.settings.seedColor) events.onFontAxesChanged(clockCtx.settings.axes) smallClock.run { events.onThemeChanged(theme) events.onThemeChanged(theme.copy(isDarkTheme = isDarkTheme)) animations.doze(dozeFraction) animations.fold(foldFraction) events.onTimeTick() } largeClock.run { events.onThemeChanged(theme) events.onThemeChanged(theme.copy(isDarkTheme = isDarkTheme)) animations.doze(dozeFraction) animations.fold(foldFraction) events.onTimeTick() Loading
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/FlexClockFaceController.kt +1 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ class FlexClockFaceController( } override fun onThemeChanged(theme: ThemeConfig) { this@FlexClockFaceController.theme = theme layerController.faceEvents.onThemeChanged(theme) } Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardClockViewBinder.kt +12 −0 Original line number Diff line number Diff line Loading @@ -170,6 +170,18 @@ object KeyguardClockViewBinder { } } disposables += keyguardRootView.repeatWhenAttached { repeatOnLifecycle(Lifecycle.State.STARTED) { viewModel.currentClock.collect { currentClock -> currentClock?.apply { smallClock.run { events.onThemeChanged(theme) } largeClock.run { events.onThemeChanged(theme) } } } } } return disposables } Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt +1 −0 Original line number Diff line number Diff line Loading @@ -680,6 +680,7 @@ constructor( } // In clock preview, we should have a seed color for clock // before setting clock to clockEventController to avoid updateColor with seedColor == null // So in update colors, it should already have the correct theme in clockFaceController if (MigrateClocksToBlueprint.isEnabled) { clockController.clock = clock } Loading