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

Commit 67856547 authored by Austin Delgado's avatar Austin Delgado
Browse files

Update Prompt Fallback View for CTS tests

Flag: android.hardware.biometrics.bp_fallback_options
Test: atest BiometricPromptFallbackOptionsTest
Bug: 416069294
Change-Id: I8619133edd2827f0024bfd5d791e76ce062620a9
parent 5ec442d2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -47,7 +47,10 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.testTagsAsResourceId
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.compose.theme.PlatformTheme
@@ -115,6 +118,7 @@ fun BiometricPromptFallbackView(promptViewModel: PromptViewModel, callback: Spag
                        text = stringResource(credentialText),
                        index = optionCount++,
                        total = optionTotal.value,
                        modifier = Modifier.testTag("fallback_credential_button"),
                        onClick = {
                            promptViewModel.onSwitchToCredential()
                            callback.onUseDeviceCredential()
@@ -193,6 +197,7 @@ private fun OptionItem(
        modifier =
            modifier
                .fillMaxWidth()
                .semantics { testTagsAsResourceId = true }
                .clickable(onClick = onClick, enabled = enabled)
                .alpha(if (enabled) 1f else 0.4f),
        shape = shape,