• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
32     @Override
onAttach(Context context)33     public void onAttach(Context context) {
34         super.onAttach(context);
35         use(BiometricSettingsAppPreferenceController.class).setUserId(mUserId);
36     }
37 
38     @Override
getPreferenceScreenResId()39     protected int getPreferenceScreenResId() {
40         return R.xml.security_settings_combined_biometric_profile;
41     }
42 
43     @Override
getFacePreferenceKey()44     public String getFacePreferenceKey() {
45         return KEY_FACE_SETTINGS;
46     }
47 
48     @Override
getFingerprintPreferenceKey()49     public String getFingerprintPreferenceKey() {
50         return KEY_FINGERPRINT_SETTINGS;
51     }
52 
53     @Override
getLogTag()54     protected String getLogTag() {
55         return TAG;
56     }
57 
58     @Override
getMetricsCategory()59     public int getMetricsCategory() {
60         return SettingsEnums.COMBINED_BIOMETRIC_PROFILE;
61     }
62 
63     public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
64             new CombinedBiometricSearchIndexProvider(
65                     R.xml.security_settings_combined_biometric_profile);
66 }
67