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

Commit 0f0c7ec4 authored by Hawkwood Glazier's avatar Hawkwood Glazier
Browse files

Remove isReactiveToTouch in favor of using axis data

Bug: 364675294
Test: Manual
Flag: NONE Simple interface rename
Change-Id: I2afc49272fb309c48bfb522b09d2b7ce456171de
parent 640670c3
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(),
)