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

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

Merge "Make 'customize lock screen' button config aware." into main

parents 6b5a67dd 857d1810
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="@androidprv:color/materialColorOnSecondaryFixed"
        android:textSize="14sp"
        android:maxLines="1"
        android:ellipsize="end" />

+8 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
package com.android.systemui.keyguard.ui.binder

import android.graphics.Rect
import android.util.TypedValue
import android.view.View
import android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED
import android.widget.TextView
@@ -101,6 +102,13 @@ object KeyguardSettingsViewBinder {
                            }
                        }
                    }

                    launch("$TAG#viewModel.textSize") {
                        viewModel.textSize.collect { textSize ->
                            val textView: TextView = view.requireViewById(R.id.text)
                            textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize.toFloat())
                        }
                    }
                }
            }
        return disposableHandle
+9 −11
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.systemui.keyguard.ui.viewmodel

import com.android.systemui.common.shared.model.Icon
import com.android.systemui.common.shared.model.Text
import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor
import com.android.systemui.keyguard.domain.interactor.KeyguardTouchHandlingInteractor
import com.android.systemui.res.R
import javax.inject.Inject
@@ -29,19 +30,18 @@ class KeyguardSettingsMenuViewModel
@Inject
constructor(
    private val interactor: KeyguardTouchHandlingInteractor,
    configurationInteractor: ConfigurationInteractor,
) {
    val isVisible: Flow<Boolean> = interactor.isMenuVisible
    val shouldOpenSettings: Flow<Boolean> = interactor.shouldOpenSettings

    val icon: Icon =
        Icon.Resource(
            res = R.drawable.ic_palette,
            contentDescription = null,
        )
    val icon: Icon = Icon.Resource(res = R.drawable.ic_palette, contentDescription = null)

    val text: Text = Text.Resource(res = R.string.lock_screen_settings)

    val text: Text =
        Text.Resource(
            res = R.string.lock_screen_settings,
    val textSize =
        configurationInteractor.dimensionPixelSize(
            com.android.internal.R.dimen.text_size_small_material
        )

    fun onTouchGestureStarted() {
@@ -49,9 +49,7 @@ constructor(
    }

    fun onTouchGestureEnded(isClick: Boolean) {
        interactor.onMenuTouchGestureEnded(
            isClick = isClick,
        )
        interactor.onMenuTouchGestureEnded(isClick = isClick)
    }

    fun onSettingsShown() {