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 24 /** 25 * Settings screen for multiple biometrics used in work profile. 26 */ 27 public class CombinedBiometricProfileSettings extends BiometricsSettingsBase { 28 private static final String TAG = "BiometricProfileSetting"; 29 private static final String KEY_FACE_SETTINGS = "biometric_face_settings_profile"; 30 private static final String KEY_FINGERPRINT_SETTINGS = "biometric_fingerprint_settings_profile"; 31 private static final String KEY_UNLOCK_PHONE = "biometric_settings_biometric_keyguard_profile"; 32 private static final String KEY_USE_IN_APPS = "biometric_settings_biometric_app_profile"; 33 34 @Override onAttach(Context context)35 public void onAttach(Context context) { 36 super.onAttach(context); 37 use(BiometricSettingsAppPreferenceController.class).setUserId(mUserId); 38 } 39 40 @Override getPreferenceScreenResId()41 protected int getPreferenceScreenResId() { 42 return R.xml.security_settings_combined_biometric_profile; 43 } 44 45 @Override getFacePreferenceKey()46 public String getFacePreferenceKey() { 47 return KEY_FACE_SETTINGS; 48 } 49 50 @Override getFingerprintPreferenceKey()51 public String getFingerprintPreferenceKey() { 52 return KEY_FINGERPRINT_SETTINGS; 53 } 54 55 @Override getUnlockPhonePreferenceKey()56 public String getUnlockPhonePreferenceKey() { 57 return KEY_UNLOCK_PHONE; 58 } 59 60 @Override getUseInAppsPreferenceKey()61 public String getUseInAppsPreferenceKey() { 62 return KEY_USE_IN_APPS; 63 } 64 65 @Override getLogTag()66 protected String getLogTag() { 67 return TAG; 68 } 69 70 @Override getMetricsCategory()71 public int getMetricsCategory() { 72 return SettingsEnums.COMBINED_BIOMETRIC_PROFILE; 73 } 74 75 public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = 76 new CombinedBiometricSearchIndexProvider( 77 R.xml.security_settings_combined_biometric_profile); 78 } 79