From 9b3f1afb50de1dc5a802b3b3c0ec4225f3b04929 Mon Sep 17 00:00:00 2001 From: Oliver Scott Date: Wed, 27 Dec 2023 11:38:53 -0500 Subject: [PATCH] fixup! Simplify biometric detection Change-Id: I2964746a5d648dc51328bac28e4fe5893341d1a6 --- .../setupwizard/BiometricActivity.java | 61 +------------------ 1 file changed, 1 insertion(+), 60 deletions(-) diff --git a/src/org/lineageos/setupwizard/BiometricActivity.java b/src/org/lineageos/setupwizard/BiometricActivity.java index c477fa40..5323e3fc 100644 --- a/src/org/lineageos/setupwizard/BiometricActivity.java +++ b/src/org/lineageos/setupwizard/BiometricActivity.java @@ -18,76 +18,17 @@ package org.lineageos.setupwizard; import static org.lineageos.setupwizard.SetupWizardApp.ACTION_SETUP_BIOMETRIC; -import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_DETAILS; -import static org.lineageos.setupwizard.SetupWizardApp.EXTRA_TITLE; import static org.lineageos.setupwizard.SetupWizardApp.REQUEST_CODE_SETUP_BIOMETRIC; import android.content.Intent; -import android.os.Bundle; -import android.widget.TextView; -import com.google.android.setupcompat.util.WizardManagerHelper; -import com.google.android.setupdesign.util.ThemeHelper; - -import org.lineageos.setupwizard.util.SetupWizardUtils; - -public class BiometricActivity extends SubBaseActivity { +public class BiometricActivity extends WrapperSubBaseActivity { public static final String TAG = BiometricActivity.class.getSimpleName(); - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - final TextView setupBiometricSummary = (TextView) findViewById( - R.id.setup_biometric_summary); - final TextView setupAddBiometric = (TextView) findViewById(R.id.setup_add_biometric); - if (SetupWizardUtils.hasFace(this)) { - setupBiometricSummary.setText(getString(R.string.face_setup_summary)); - setupAddBiometric.setText(R.string.face_setup_add_face); - } else { - setupBiometricSummary.setText(getString(R.string.fingerprint_setup_summary)); - setupAddBiometric.setText(R.string.fingerprint_setup_add_fingerprint); - } - } - - @Override - protected void onNextPressed() { - launchBiometricSetup(); - } - @Override protected void onStartSubactivity() { - setNextAllowed(true); - } - - @Override - protected int getLayoutResId() { - return R.layout.setup_biometric; - } - - @Override - protected int getTitleResId() { - if (SetupWizardUtils.hasFace(this)) { - return R.string.face_setup_title; - } - return R.string.fingerprint_setup_title; - } - - @Override - protected int getIconResId() { - if (SetupWizardUtils.hasFace(this)) { - return R.drawable.ic_face; - } - return R.drawable.ic_fingerprint; - } - - private void launchBiometricSetup() { Intent intent = new Intent(ACTION_SETUP_BIOMETRIC); - intent.putExtra(EXTRA_TITLE, - getString(getTitleResId())); - intent.putExtra(EXTRA_DETAILS, - getString(R.string.settings_biometric_setup_details)); - intent.putExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, true); startSubactivity(intent, REQUEST_CODE_SETUP_BIOMETRIC); } }