1/*
2 * Copyright (C) 2015 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
17package com.android.settings.fingerprint;
18
19import android.content.Intent;
20import android.content.res.Resources;
21import android.view.View;
22import android.widget.Button;
23
24import com.android.settings.R;
25import com.android.settings.SetupWizardUtils;
26import com.android.setupwizardlib.view.NavigationBar;
27
28public class SetupFingerprintEnrollIntroduction extends FingerprintEnrollIntroduction
29        implements NavigationBar.NavigationBarListener {
30
31    @Override
32    protected Intent getOnboardIntent() {
33        final Intent intent = new Intent(this, SetupFingerprintEnrollOnboard.class);
34        SetupWizardUtils.copySetupExtras(getIntent(), intent);
35        return intent;
36    }
37
38    @Override
39    protected Intent getFindSensorIntent() {
40        final Intent intent = new Intent(this, SetupFingerprintEnrollFindSensor.class);
41        SetupWizardUtils.copySetupExtras(getIntent(), intent);
42        return intent;
43    }
44
45    @Override
46    protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
47        resid = SetupWizardUtils.getTheme(getIntent());
48        super.onApplyThemeResource(theme, resid, first);
49    }
50
51    @Override
52    protected void initViews() {
53        SetupWizardUtils.setImmersiveMode(this);
54
55        final View buttonBar = findViewById(R.id.button_bar);
56        if (buttonBar != null) {
57            buttonBar.setVisibility(View.GONE);
58        }
59
60        getNavigationBar().setNavigationBarListener(this);
61    }
62
63    @Override
64    protected Button getNextButton() {
65        return getNavigationBar().getNextButton();
66    }
67
68    @Override
69    public void onNavigateBack() {
70        onBackPressed();
71    }
72
73    @Override
74    public void onNavigateNext() {
75        onNextButtonClick();
76    }
77}
78