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

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

Merge "[flexiglass] Adds tracing to bouncer view-models" into main

parents a092124e ded65cc2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@ sealed class AuthMethodBouncerViewModel(
     * being able to attempt to unlock the device.
     */
    val isInputEnabled: StateFlow<Boolean>,

    /** Name to use for performance tracing purposes. */
    val traceName: String,
) : ExclusiveActivatable() {

    private val _animateFailure = MutableStateFlow(false)
+2 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.graphics.Bitmap
import androidx.compose.ui.input.key.KeyEvent
import androidx.compose.ui.input.key.type
import androidx.core.graphics.drawable.toBitmap
import com.android.app.tracing.coroutines.traceCoroutine
import com.android.systemui.authentication.domain.interactor.AuthenticationInteractor
import com.android.systemui.authentication.shared.model.AuthenticationMethodModel
import com.android.systemui.authentication.shared.model.AuthenticationWipeModel
@@ -146,7 +147,7 @@ constructor(
                    .map(::getChildViewModel)
                    .collectLatest { childViewModelOrNull ->
                        _authMethodViewModel.value = childViewModelOrNull
                        childViewModelOrNull?.activate()
                        childViewModelOrNull?.let { traceCoroutine(it.traceName) { it.activate() } }
                    }
            }

+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ constructor(
    AuthMethodBouncerViewModel(
        interactor = interactor,
        isInputEnabled = isInputEnabled,
        traceName = "PasswordBouncerViewModel",
    ) {

    private val _password = MutableStateFlow("")
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ constructor(
    AuthMethodBouncerViewModel(
        interactor = interactor,
        isInputEnabled = isInputEnabled,
        traceName = "PatternBouncerViewModel",
    ) {

    /** The number of columns in the dot grid. */
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ constructor(
    AuthMethodBouncerViewModel(
        interactor = interactor,
        isInputEnabled = isInputEnabled,
        traceName = "PinBouncerViewModel",
    ) {
    /**
     * Whether the sim-related UI in the pin view is showing.