Loading packages/SystemUI/customization/src/com/android/systemui/shared/clocks/ComposedDigitalLayerController.kt +7 −4 Original line number Diff line number Diff line Loading @@ -111,10 +111,6 @@ class ComposedDigitalLayerController(private val clockCtx: ClockContext) : override fun onZenDataChanged(data: ZenData) {} override fun onFontAxesChanged(axes: ClockAxisStyle) { view.updateAxes(axes) } override var isReactiveTouchInteractionEnabled get() = view.isReactiveTouchInteractionEnabled set(value) { Loading Loading @@ -152,6 +148,13 @@ class ComposedDigitalLayerController(private val clockCtx: ClockContext) : override fun onFidgetTap(x: Float, y: Float) { view.animateFidget(x, y) } private var hasFontAxes = false override fun onFontAxesChanged(style: ClockAxisStyle) { view.updateAxes(style, isAnimated = hasFontAxes) hasFontAxes = true } } override val faceEvents = Loading packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt +2 −2 Original line number Diff line number Diff line Loading @@ -231,8 +231,6 @@ class DefaultClockController( override fun onAlarmDataChanged(data: AlarmData) {} override fun onZenDataChanged(data: ZenData) {} override fun onFontAxesChanged(axes: ClockAxisStyle) {} } open inner class DefaultClockAnimations( Loading Loading @@ -285,6 +283,8 @@ class DefaultClockController( override fun onPositionUpdated(distance: Float, fraction: Float) {} override fun onFidgetTap(x: Float, y: Float) {} override fun onFontAxesChanged(style: ClockAxisStyle) {} } inner class LargeClockAnimations( Loading packages/SystemUI/customization/src/com/android/systemui/shared/clocks/FlexClockController.kt +2 −7 Original line number Diff line number Diff line Loading @@ -99,12 +99,6 @@ class FlexClockController(private val clockCtx: ClockContext) : ClockController smallClock.events.onZenDataChanged(data) largeClock.events.onZenDataChanged(data) } override fun onFontAxesChanged(axes: ClockAxisStyle) { val fontAxes = ClockAxisStyle(getDefaultAxes(clockCtx.settings).merge(axes)) smallClock.events.onFontAxesChanged(fontAxes) largeClock.events.onFontAxesChanged(fontAxes) } } override fun initialize( Loading @@ -113,10 +107,10 @@ class FlexClockController(private val clockCtx: ClockContext) : ClockController foldFraction: Float, clockListener: ClockEventListener?, ) { events.onFontAxesChanged(clockCtx.settings.axes) smallClock.run { layerController.onViewBoundsChanged = { clockListener?.onBoundsChanged(it) } events.onThemeChanged(theme.copy(isDarkTheme = isDarkTheme)) animations.onFontAxesChanged(clockCtx.settings.axes) animations.doze(dozeFraction) animations.fold(foldFraction) events.onTimeTick() Loading @@ -125,6 +119,7 @@ class FlexClockController(private val clockCtx: ClockContext) : ClockController largeClock.run { layerController.onViewBoundsChanged = { clockListener?.onBoundsChanged(it) } events.onThemeChanged(theme.copy(isDarkTheme = isDarkTheme)) animations.onFontAxesChanged(clockCtx.settings.axes) animations.doze(dozeFraction) animations.fold(foldFraction) events.onTimeTick() Loading packages/SystemUI/customization/src/com/android/systemui/shared/clocks/FlexClockFaceController.kt +11 −9 Original line number Diff line number Diff line Loading @@ -31,10 +31,12 @@ import com.android.systemui.plugins.clocks.ClockFaceConfig import com.android.systemui.plugins.clocks.ClockFaceController import com.android.systemui.plugins.clocks.ClockFaceEvents import com.android.systemui.plugins.clocks.ClockFaceLayout import com.android.systemui.plugins.clocks.ClockFontAxis.Companion.merge import com.android.systemui.plugins.clocks.DefaultClockFaceLayout 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.FlexClockController.Companion.getDefaultAxes import com.android.systemui.shared.clocks.FontUtils.get import com.android.systemui.shared.clocks.FontUtils.set import com.android.systemui.shared.clocks.ViewUtils.computeLayoutDiff Loading Loading @@ -131,15 +133,6 @@ class FlexClockFaceController(clockCtx: ClockContext, private val isLargeClock: layerController.faceEvents.onThemeChanged(theme) } override fun onFontAxesChanged(settings: ClockAxisStyle) { var axes = ClockAxisStyle(settings) if (!isLargeClock && axes[GSFAxes.WIDTH] > SMALL_CLOCK_MAX_WDTH) { axes[GSFAxes.WIDTH] = SMALL_CLOCK_MAX_WDTH } layerController.events.onFontAxesChanged(axes) } /** * targetRegion passed to all customized clock applies counter translationY of Keyguard and * keyguard_large_clock_top_margin from default clock Loading Loading @@ -232,6 +225,15 @@ class FlexClockFaceController(clockCtx: ClockContext, private val isLargeClock: override fun onFidgetTap(x: Float, y: Float) { layerController.animations.onFidgetTap(x, y) } override fun onFontAxesChanged(style: ClockAxisStyle) { var axes = ClockAxisStyle(getDefaultAxes(clockCtx.settings).merge(style)) if (!isLargeClock && axes[GSFAxes.WIDTH] > SMALL_CLOCK_MAX_WDTH) { axes[GSFAxes.WIDTH] = SMALL_CLOCK_MAX_WDTH } layerController.animations.onFontAxesChanged(axes) } } companion object { Loading packages/SystemUI/customization/src/com/android/systemui/shared/clocks/SimpleDigitalHandLayerController.kt +7 −4 Original line number Diff line number Diff line Loading @@ -171,10 +171,6 @@ open class SimpleDigitalHandLayerController( override fun onAlarmDataChanged(data: AlarmData) {} override fun onZenDataChanged(data: ZenData) {} override fun onFontAxesChanged(axes: ClockAxisStyle) { view.updateAxes(axes) } } override val animations = Loading @@ -195,6 +191,13 @@ open class SimpleDigitalHandLayerController( view.dozeFraction = fraction } private var hasFontAxes = false override fun onFontAxesChanged(style: ClockAxisStyle) { view.updateAxes(style, isAnimated = hasFontAxes) hasFontAxes = true } override fun fold(fraction: Float) { applyLayout() refreshTime() Loading Loading
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/ComposedDigitalLayerController.kt +7 −4 Original line number Diff line number Diff line Loading @@ -111,10 +111,6 @@ class ComposedDigitalLayerController(private val clockCtx: ClockContext) : override fun onZenDataChanged(data: ZenData) {} override fun onFontAxesChanged(axes: ClockAxisStyle) { view.updateAxes(axes) } override var isReactiveTouchInteractionEnabled get() = view.isReactiveTouchInteractionEnabled set(value) { Loading Loading @@ -152,6 +148,13 @@ class ComposedDigitalLayerController(private val clockCtx: ClockContext) : override fun onFidgetTap(x: Float, y: Float) { view.animateFidget(x, y) } private var hasFontAxes = false override fun onFontAxesChanged(style: ClockAxisStyle) { view.updateAxes(style, isAnimated = hasFontAxes) hasFontAxes = true } } override val faceEvents = Loading
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockController.kt +2 −2 Original line number Diff line number Diff line Loading @@ -231,8 +231,6 @@ class DefaultClockController( override fun onAlarmDataChanged(data: AlarmData) {} override fun onZenDataChanged(data: ZenData) {} override fun onFontAxesChanged(axes: ClockAxisStyle) {} } open inner class DefaultClockAnimations( Loading Loading @@ -285,6 +283,8 @@ class DefaultClockController( override fun onPositionUpdated(distance: Float, fraction: Float) {} override fun onFidgetTap(x: Float, y: Float) {} override fun onFontAxesChanged(style: ClockAxisStyle) {} } inner class LargeClockAnimations( Loading
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/FlexClockController.kt +2 −7 Original line number Diff line number Diff line Loading @@ -99,12 +99,6 @@ class FlexClockController(private val clockCtx: ClockContext) : ClockController smallClock.events.onZenDataChanged(data) largeClock.events.onZenDataChanged(data) } override fun onFontAxesChanged(axes: ClockAxisStyle) { val fontAxes = ClockAxisStyle(getDefaultAxes(clockCtx.settings).merge(axes)) smallClock.events.onFontAxesChanged(fontAxes) largeClock.events.onFontAxesChanged(fontAxes) } } override fun initialize( Loading @@ -113,10 +107,10 @@ class FlexClockController(private val clockCtx: ClockContext) : ClockController foldFraction: Float, clockListener: ClockEventListener?, ) { events.onFontAxesChanged(clockCtx.settings.axes) smallClock.run { layerController.onViewBoundsChanged = { clockListener?.onBoundsChanged(it) } events.onThemeChanged(theme.copy(isDarkTheme = isDarkTheme)) animations.onFontAxesChanged(clockCtx.settings.axes) animations.doze(dozeFraction) animations.fold(foldFraction) events.onTimeTick() Loading @@ -125,6 +119,7 @@ class FlexClockController(private val clockCtx: ClockContext) : ClockController largeClock.run { layerController.onViewBoundsChanged = { clockListener?.onBoundsChanged(it) } events.onThemeChanged(theme.copy(isDarkTheme = isDarkTheme)) animations.onFontAxesChanged(clockCtx.settings.axes) animations.doze(dozeFraction) animations.fold(foldFraction) events.onTimeTick() Loading
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/FlexClockFaceController.kt +11 −9 Original line number Diff line number Diff line Loading @@ -31,10 +31,12 @@ import com.android.systemui.plugins.clocks.ClockFaceConfig import com.android.systemui.plugins.clocks.ClockFaceController import com.android.systemui.plugins.clocks.ClockFaceEvents import com.android.systemui.plugins.clocks.ClockFaceLayout import com.android.systemui.plugins.clocks.ClockFontAxis.Companion.merge import com.android.systemui.plugins.clocks.DefaultClockFaceLayout 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.FlexClockController.Companion.getDefaultAxes import com.android.systemui.shared.clocks.FontUtils.get import com.android.systemui.shared.clocks.FontUtils.set import com.android.systemui.shared.clocks.ViewUtils.computeLayoutDiff Loading Loading @@ -131,15 +133,6 @@ class FlexClockFaceController(clockCtx: ClockContext, private val isLargeClock: layerController.faceEvents.onThemeChanged(theme) } override fun onFontAxesChanged(settings: ClockAxisStyle) { var axes = ClockAxisStyle(settings) if (!isLargeClock && axes[GSFAxes.WIDTH] > SMALL_CLOCK_MAX_WDTH) { axes[GSFAxes.WIDTH] = SMALL_CLOCK_MAX_WDTH } layerController.events.onFontAxesChanged(axes) } /** * targetRegion passed to all customized clock applies counter translationY of Keyguard and * keyguard_large_clock_top_margin from default clock Loading Loading @@ -232,6 +225,15 @@ class FlexClockFaceController(clockCtx: ClockContext, private val isLargeClock: override fun onFidgetTap(x: Float, y: Float) { layerController.animations.onFidgetTap(x, y) } override fun onFontAxesChanged(style: ClockAxisStyle) { var axes = ClockAxisStyle(getDefaultAxes(clockCtx.settings).merge(style)) if (!isLargeClock && axes[GSFAxes.WIDTH] > SMALL_CLOCK_MAX_WDTH) { axes[GSFAxes.WIDTH] = SMALL_CLOCK_MAX_WDTH } layerController.animations.onFontAxesChanged(axes) } } companion object { Loading
packages/SystemUI/customization/src/com/android/systemui/shared/clocks/SimpleDigitalHandLayerController.kt +7 −4 Original line number Diff line number Diff line Loading @@ -171,10 +171,6 @@ open class SimpleDigitalHandLayerController( override fun onAlarmDataChanged(data: AlarmData) {} override fun onZenDataChanged(data: ZenData) {} override fun onFontAxesChanged(axes: ClockAxisStyle) { view.updateAxes(axes) } } override val animations = Loading @@ -195,6 +191,13 @@ open class SimpleDigitalHandLayerController( view.dozeFraction = fraction } private var hasFontAxes = false override fun onFontAxesChanged(style: ClockAxisStyle) { view.updateAxes(style, isAnimated = hasFontAxes) hasFontAxes = true } override fun fold(fraction: Float) { applyLayout() refreshTime() Loading