[Fingerprint] Add fingerprint enroll in setup wizard

Make a subclass for each enrolling screen that setup wizard uses, and
in override the corresponding get*Intent methods to always use the
setup wizard versions of the next screens.

On minor change made to the original flow is that it will now return
RESULT_OK if it is finished, as opposed to RESULT_CANCELED.

Bug: 21695577
Change-Id: Id666826e8027272ede6a5426967d66fb291670a4
This commit is contained in:
Maurice Lam
2015-07-09 16:38:37 -07:00
parent e1eaed079c
commit 8d1f9c9be5
22 changed files with 436 additions and 34 deletions

View File

@@ -28,11 +28,9 @@ import android.content.res.Resources;
import android.os.Bundle;
import android.os.UserHandle;
import android.preference.PreferenceFragment;
import android.hardware.fingerprint.FingerprintManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
/**
* Setup Wizard's version of ChooseLockGeneric screen. It inherits the logic and basic structure
@@ -70,14 +68,6 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric {
final SetupWizardListLayout layout = (SetupWizardListLayout) inflater.inflate(
R.layout.setup_choose_lock_generic, container, false);
layout.setHeaderText(getActivity().getTitle());
ListView list = layout.getListView();
final FingerprintManager fpm = (FingerprintManager)
getActivity().getSystemService(Context.FINGERPRINT_SERVICE);
if (fpm != null && fpm.isHardwareDetected()) {
final View footer = inflater.inflate(
R.layout.setup_screen_lock_fingerprint_details, list, false);
list.addFooterView(footer, null, false);
}
final NavigationBar navigationBar = layout.getNavigationBar();
navigationBar.getNextButton().setEnabled(false);