• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 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.face;
18 
19 import android.app.settings.SettingsEnums;
20 import android.os.Bundle;
21 import android.view.View;
22 
23 import com.android.settings.R;
24 import com.android.settings.biometrics.BiometricEnrollBase;
25 
26 import com.google.android.setupcompat.template.FooterBarMixin;
27 import com.google.android.setupcompat.template.FooterButton;
28 
29 /**
30  * Activity which concludes face enrollment.
31  */
32 public class FaceEnrollFinish extends BiometricEnrollBase {
33 
34     @Override
onCreate(Bundle savedInstanceState)35     protected void onCreate(Bundle savedInstanceState) {
36         super.onCreate(savedInstanceState);
37         setContentView(R.layout.face_enroll_finish);
38         setHeaderText(R.string.security_settings_face_enroll_finish_title);
39 
40         mFooterBarMixin = getLayout().getMixin(FooterBarMixin.class);
41         mFooterBarMixin.setPrimaryButton(
42                 new FooterButton.Builder(this)
43                         .setText(R.string.security_settings_face_enroll_done)
44                         .setListener(this::onNextButtonClick)
45                         .setButtonType(FooterButton.ButtonType.NEXT)
46                         .setTheme(R.style.SudGlifButton_Primary)
47                         .build()
48         );
49     }
50 
51     @Override
getMetricsCategory()52     public int getMetricsCategory() {
53         return SettingsEnums.FACE_ENROLL_FINISHED;
54     }
55 
56     @Override
onNextButtonClick(View view)57     public void onNextButtonClick(View view) {
58         setResult(RESULT_FINISHED);
59         finish();
60     }
61 }
62