1 /* 2 * Copyright (C) 2023 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.settings.biometrics.fingerprint; 18 19 import android.content.Context; 20 import android.content.Intent; 21 import android.os.Bundle; 22 23 import androidx.annotation.NonNull; 24 import androidx.annotation.Nullable; 25 26 import com.android.settings.biometrics.fingerprint.feature.SfpsEnrollmentFeature; 27 import com.android.settings.biometrics.fingerprint.feature.SfpsRestToUnlockFeature; 28 29 public interface FingerprintFeatureProvider { 30 /** 31 * Gets the feature implementation of SFPS enrollment. 32 * @return the feature implementation 33 */ getSfpsEnrollmentFeature()34 SfpsEnrollmentFeature getSfpsEnrollmentFeature(); 35 36 37 /** 38 * Gets calibrator for udfps pre-enroll 39 * @param appContext application context 40 * @param activitySavedInstanceState activity savedInstanceState 41 * @param activityIntent activity intent 42 */ 43 @Nullable getUdfpsEnrollCalibrator(@onNull Context appContext, @Nullable Bundle activitySavedInstanceState, @Nullable Intent activityIntent)44 default UdfpsEnrollCalibrator getUdfpsEnrollCalibrator(@NonNull Context appContext, 45 @Nullable Bundle activitySavedInstanceState, @Nullable Intent activityIntent) { 46 return null; 47 } 48 49 /** 50 * Gets the feature implementation of SFPS rest to unlock. 51 * @param context context 52 * @return the feature implementation 53 */ getSfpsRestToUnlockFeature(@onNull Context context)54 SfpsRestToUnlockFeature getSfpsRestToUnlockFeature(@NonNull Context context); 55 } 56