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 21 import androidx.annotation.NonNull; 22 import androidx.annotation.Nullable; 23 24 import com.android.settings.biometrics.fingerprint.feature.SfpsEnrollmentFeature; 25 import com.android.settings.biometrics.fingerprint.feature.SfpsEnrollmentFeatureImpl; 26 import com.android.settings.biometrics.fingerprint.feature.SfpsRestToUnlockFeature; 27 import com.android.settings.biometrics.fingerprint.feature.SfpsRestToUnlockFeatureImpl; 28 29 public class FingerprintFeatureProviderImpl implements FingerprintFeatureProvider { 30 31 @Nullable 32 private SfpsEnrollmentFeature mSfpsEnrollmentFeatureImpl = null; 33 34 @Nullable 35 private SfpsRestToUnlockFeature mSfpsRestToUnlockFeature = null; 36 37 @Override getSfpsEnrollmentFeature()38 public SfpsEnrollmentFeature getSfpsEnrollmentFeature() { 39 if (mSfpsEnrollmentFeatureImpl == null) { 40 mSfpsEnrollmentFeatureImpl = new SfpsEnrollmentFeatureImpl(); 41 } 42 return mSfpsEnrollmentFeatureImpl; 43 } 44 45 @Override getSfpsRestToUnlockFeature(@onNull Context context)46 public SfpsRestToUnlockFeature getSfpsRestToUnlockFeature(@NonNull Context context) { 47 if (mSfpsRestToUnlockFeature == null) { 48 mSfpsRestToUnlockFeature = new SfpsRestToUnlockFeatureImpl(); 49 } 50 return mSfpsRestToUnlockFeature; 51 } 52 } 53