1 /* 2 * Copyright (C) 2021 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 package com.android.settings.biometrics.combination; 17 18 import android.app.settings.SettingsEnums; 19 import android.content.Context; 20 21 import com.android.settings.R; 22 import com.android.settings.search.BaseSearchIndexProvider; 23 import com.android.settingslib.search.SearchIndexable; 24 25 /** 26 * Settings screen for multiple biometrics. 27 */ 28 @SearchIndexable 29 public class CombinedBiometricSettings extends BiometricsSettingsBase { 30 private static final String TAG = "BiometricSettings"; 31 private static final String KEY_FACE_SETTINGS = "biometric_face_settings"; 32 private static final String KEY_FINGERPRINT_SETTINGS = "biometric_fingerprint_settings"; 33 34 @Override onAttach(Context context)35 public void onAttach(Context context) { 36 super.onAttach(context); 37 use(BiometricSettingsKeyguardPreferenceController.class).setUserId(mUserId); 38 use(BiometricSettingsAppPreferenceController.class).setUserId(mUserId); 39 } 40 41 @Override getPreferenceScreenResId()42 protected int getPreferenceScreenResId() { 43 return R.xml.security_settings_combined_biometric; 44 } 45 46 @Override getFacePreferenceKey()47 public String getFacePreferenceKey() { 48 return KEY_FACE_SETTINGS; 49 } 50 51 @Override getFingerprintPreferenceKey()52 public String getFingerprintPreferenceKey() { 53 return KEY_FINGERPRINT_SETTINGS; 54 } 55 56 @Override getLogTag()57 protected String getLogTag() { 58 return TAG; 59 } 60 61 @Override getMetricsCategory()62 public int getMetricsCategory() { 63 return SettingsEnums.COMBINED_BIOMETRIC; 64 } 65 66 public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = 67 new CombinedBiometricSearchIndexProvider(R.xml.security_settings_combined_biometric); 68 } 69