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

Commit 8a147e41 authored by Brad Hinegardner's avatar Brad Hinegardner
Browse files

Make FlexClockView default clock use proper font

Bug: 374787902
Test: manual
Flag: com.android.systemui.clock_reactive_variants
Change-Id: Iecb3782a5b076f78b3702405cfee51835c91429e
parent 42cdae92
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ class DefaultClockProvider(
    val resources: Resources,
    private val hasStepClockAnimation: Boolean = false,
    private val migratedClocks: Boolean = false,
    private val clockReactiveVariants: Boolean = false,
    private val isClockReactiveVariantsEnabled: Boolean = false,
) : ClockProvider {
    private var messageBuffers: ClockMessageBuffers? = null

@@ -54,7 +54,7 @@ class DefaultClockProvider(
            throw IllegalArgumentException("${settings.clockId} is unsupported by $TAG")
        }

        return if (clockReactiveVariants) {
        return if (isClockReactiveVariantsEnabled) {
            val buffer =
                messageBuffers?.infraMessageBuffer ?: LogcatOnlyMessageBuffer(LogLevel.INFO)
            val assets = AssetLoader(ctx, ctx, "clocks/", buffer)
@@ -84,7 +84,7 @@ class DefaultClockProvider(
            // TODO(b/352049256): Update placeholder to actual resource
            resources.getDrawable(R.drawable.clock_default_thumbnail, null),
            isReactiveToTone = true,
            isReactiveToTouch = clockReactiveVariants,
            isReactiveToTouch = isClockReactiveVariantsEnabled,
            axes = listOf(), // TODO: Ater some picker definition
        )
    }
@@ -103,7 +103,6 @@ class DefaultClockProvider(
                                    timespec = DigitalTimespec.FIRST_DIGIT,
                                    style =
                                        FontTextStyle(
                                            fontFamily = "google_sans_flex.ttf",
                                            lineHeight = 147.25f,
                                            fontVariation =
                                                "'wght' 603, 'wdth' 100, 'opsz' 144, 'ROND' 100",
@@ -112,7 +111,6 @@ class DefaultClockProvider(
                                        FontTextStyle(
                                            fontVariation =
                                                "'wght' 74, 'wdth' 43, 'opsz' 144, 'ROND' 100",
                                            fontFamily = "google_sans_flex.ttf",
                                            fillColorLight = "#FFFFFFFF",
                                            outlineColor = "#00000000",
                                            renderType = RenderType.CHANGE_WEIGHT,
@@ -131,7 +129,6 @@ class DefaultClockProvider(
                                    timespec = DigitalTimespec.SECOND_DIGIT,
                                    style =
                                        FontTextStyle(
                                            fontFamily = "google_sans_flex.ttf",
                                            lineHeight = 147.25f,
                                            fontVariation =
                                                "'wght' 603, 'wdth' 100, 'opsz' 144, 'ROND' 100",
@@ -140,7 +137,6 @@ class DefaultClockProvider(
                                        FontTextStyle(
                                            fontVariation =
                                                "'wght' 74, 'wdth' 43, 'opsz' 144, 'ROND' 100",
                                            fontFamily = "google_sans_flex.ttf",
                                            fillColorLight = "#FFFFFFFF",
                                            outlineColor = "#00000000",
                                            renderType = RenderType.CHANGE_WEIGHT,
@@ -159,7 +155,6 @@ class DefaultClockProvider(
                                    timespec = DigitalTimespec.FIRST_DIGIT,
                                    style =
                                        FontTextStyle(
                                            fontFamily = "google_sans_flex.ttf",
                                            lineHeight = 147.25f,
                                            fontVariation =
                                                "'wght' 603, 'wdth' 100, 'opsz' 144, 'ROND' 100",
@@ -168,7 +163,6 @@ class DefaultClockProvider(
                                        FontTextStyle(
                                            fontVariation =
                                                "'wght' 74, 'wdth' 43, 'opsz' 144, 'ROND' 100",
                                            fontFamily = "google_sans_flex.ttf",
                                            fillColorLight = "#FFFFFFFF",
                                            outlineColor = "#00000000",
                                            renderType = RenderType.CHANGE_WEIGHT,
@@ -187,7 +181,6 @@ class DefaultClockProvider(
                                    timespec = DigitalTimespec.SECOND_DIGIT,
                                    style =
                                        FontTextStyle(
                                            fontFamily = "google_sans_flex.ttf",
                                            lineHeight = 147.25f,
                                            fontVariation =
                                                "'wght' 603, 'wdth' 100, 'opsz' 144, 'ROND' 100",
@@ -196,7 +189,6 @@ class DefaultClockProvider(
                                        FontTextStyle(
                                            fontVariation =
                                                "'wght' 74, 'wdth' 43, 'opsz' 144, 'ROND' 100",
                                            fontFamily = "google_sans_flex.ttf",
                                            fillColorLight = "#FFFFFFFF",
                                            outlineColor = "#00000000",
                                            renderType = RenderType.CHANGE_WEIGHT,
@@ -221,13 +213,11 @@ class DefaultClockProvider(
                        timespec = DigitalTimespec.TIME_FULL_FORMAT,
                        style =
                            FontTextStyle(
                                fontFamily = "google_sans_flex.ttf",
                                fontVariation = "'wght' 600, 'wdth' 100, 'opsz' 144, 'ROND' 100",
                                fontSizeScale = 0.98f,
                            ),
                        aodStyle =
                            FontTextStyle(
                                fontFamily = "google_sans_flex.ttf",
                                fontVariation = "'wght' 133, 'wdth' 43, 'opsz' 144, 'ROND' 100",
                                fillColorLight = "#FFFFFFFF",
                                outlineColor = "#00000000",