1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.systemui.biometrics 18 19 import android.hardware.biometrics.BiometricAuthenticator 20 import android.os.Bundle 21 import android.view.View 22 23 /** TODO(b/251476085): Temporary interface while legacy biometric prompt is around. */ 24 @Deprecated("temporary adapter while migrating biometric prompt - do not expand") 25 interface AuthBiometricViewAdapter { 26 val legacyIconController: AuthIconController? 27 28 fun onDialogAnimatedIn(fingerprintWasStarted: Boolean) 29 30 fun onAuthenticationSucceeded(@BiometricAuthenticator.Modality modality: Int) 31 32 fun onAuthenticationFailed( 33 @BiometricAuthenticator.Modality modality: Int, 34 failureReason: String 35 ) 36 37 fun onError(@BiometricAuthenticator.Modality modality: Int, error: String) 38 39 fun onHelp(@BiometricAuthenticator.Modality modality: Int, help: String) 40 41 fun startTransitionToCredentialUI(isError: Boolean) 42 43 fun requestLayout() 44 45 fun onSaveState(bundle: Bundle?) 46 47 fun restoreState(bundle: Bundle?) 48 49 fun onOrientationChanged() 50 51 fun cancelAnimation() 52 53 fun isCoex(): Boolean 54 55 fun asView(): View 56 } 57