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

Commit e1b76619 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove isReactiveToTouch in favor of using axis data" into main

parents c22c1db4 0f0c7ec4
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -19,12 +19,14 @@ import android.view.LayoutInflater
import com.android.systemui.customization.R
import com.android.systemui.log.core.LogLevel
import com.android.systemui.log.core.LogcatOnlyMessageBuffer
import com.android.systemui.plugins.clocks.AxisType
import com.android.systemui.plugins.clocks.ClockController
import com.android.systemui.plugins.clocks.ClockId
import com.android.systemui.plugins.clocks.ClockMessageBuffers
import com.android.systemui.plugins.clocks.ClockMetadata
import com.android.systemui.plugins.clocks.ClockPickerConfig
import com.android.systemui.plugins.clocks.ClockProvider
import com.android.systemui.plugins.clocks.ClockReactiveAxis
import com.android.systemui.plugins.clocks.ClockSettings
import com.android.systemui.shared.clocks.view.HorizontalAlignment
import com.android.systemui.shared.clocks.view.VerticalAlignment
@@ -85,8 +87,21 @@ class DefaultClockProvider(
            // TODO(b/352049256): Update placeholder to actual resource
            resources.getDrawable(R.drawable.clock_default_thumbnail, null),
            isReactiveToTone = true,
            isReactiveToTouch = isClockReactiveVariantsEnabled,
            axes = listOf(), // TODO: Ater some picker definition
            // TODO(b/364673969): Populate the rest of this
            axes =
                if (isClockReactiveVariantsEnabled)
                    listOf(
                        ClockReactiveAxis(
                            key = "wdth",
                            type = AxisType.Slider,
                            maxValue = 1000f,
                            minValue = 100f,
                            currentValue = 400f,
                            name = "Width",
                            description = "Glyph Width",
                        )
                    )
                else listOf(),
        )
    }

+1 −4
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ class DefaultClockFaceLayout(val view: View) : ClockFaceLayout {
interface ClockEvents {
    @get:ProtectedReturn("return false;")
    /** Set to enable or disable swipe interaction */
    var isReactiveTouchInteractionEnabled: Boolean
    var isReactiveTouchInteractionEnabled: Boolean // TODO(b/364664388): Remove/Rename

    /** Call whenever timezone changes */
    fun onTimeZoneChanged(timeZone: TimeZone)
@@ -322,9 +322,6 @@ constructor(
    /** True if the clock will react to tone changes in the seed color */
    val isReactiveToTone: Boolean = true,

    /** True if the clock is capable of changing style in reaction to touches */
    val isReactiveToTouch: Boolean = false,

    /** Font axes that can be modified on this clock */
    val axes: List<ClockReactiveAxis> = listOf(),
)