1 package com.android.systemui.biometrics.ui 2 3 import com.android.systemui.biometrics.AuthPanelController 4 import com.android.systemui.biometrics.ui.binder.Spaghetti 5 import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel 6 7 /** A credential variant of BiometricPrompt. */ 8 sealed interface CredentialView { 9 /** 10 * Callbacks for the "host" container view that contains this credential view. 11 * 12 * TODO(b/251476085): Removed when the host view is converted to use a parent view model. 13 */ 14 interface Host { 15 /** When the user's credential has been verified. */ onCredentialMatchednull16 fun onCredentialMatched(attestation: ByteArray) 17 18 /** When the user abandons credential verification. */ 19 fun onCredentialAborted() 20 21 /** Warn the user is warned about excessive attempts. */ 22 fun onCredentialAttemptsRemaining(remaining: Int, messageBody: String) 23 } 24 25 // TODO(251476085): remove AuthPanelController 26 fun init( 27 viewModel: CredentialViewModel, 28 host: Host, 29 panelViewController: AuthPanelController, 30 animatePanel: Boolean, 31 legacyCallback: Spaghetti.Callback, 32 ) 33 } 34