Adding an improve face matching settings option for Face Unlock

Adding an option which will launch a version of setup where faces
can be added to the current gallery.  It requires the user to first
confirm their password before launching addToSetup.

Patch 3 - Updated for renaming of FackLockTutorial to SetupIntro.
Now it is called every time regardless of it it's showing the tutorial
and a flag is passed in to determine whether or not SetupIntro shows
the tutorial.

Patch 4 - Removed 'Setup Complete' toast at the end of screen lock
setups since it was primarily for Face Unlock and the congratulations
screen removes the need for it.

Change-Id: Idc5f960809d992ec7bbce59ef1e13b95ef7cce45
This commit is contained in:
Danielle Millett
2011-11-02 11:12:21 -04:00
parent 8214d201db
commit 487b16f340
6 changed files with 33 additions and 10 deletions

View File

@@ -276,7 +276,7 @@ public class ChooseLockGeneric extends PreferenceActivity {
KEY_UNLOCK_SET_PATTERN.equals(key) || KEY_UNLOCK_SET_PIN.equals(key);
}
private Intent getBiometricSensorIntent(int quality) {
private Intent getBiometricSensorIntent() {
Intent fallBackIntent = new Intent().setClass(getActivity(), ChooseLockGeneric.class);
fallBackIntent.putExtra(LockPatternUtils.LOCKSCREEN_BIOMETRIC_WEAK_FALLBACK, true);
fallBackIntent.putExtra(CONFIRM_CREDENTIALS, false);
@@ -286,9 +286,8 @@ public class ChooseLockGeneric extends PreferenceActivity {
boolean showTutorial = ALWAY_SHOW_TUTORIAL ||
!mChooseLockSettingsHelper.utils().isBiometricWeakEverChosen();
Intent intent = new Intent();
intent.setClassName("com.android.facelock", showTutorial
? "com.android.facelock.FaceLockTutorial"
: "com.android.facelock.SetupFaceLock");
intent.setClassName("com.android.facelock", "com.android.facelock.SetupIntro");
intent.putExtra("showTutorial", showTutorial);
PendingIntent pending = PendingIntent.getActivity(getActivity(), 0, fallBackIntent, 0);
intent.putExtra("PendingIntent", pending);
return intent;
@@ -352,7 +351,7 @@ public class ChooseLockGeneric extends PreferenceActivity {
startActivity(intent);
}
} else if (quality == DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK) {
Intent intent = getBiometricSensorIntent(quality);
Intent intent = getBiometricSensorIntent();
startActivity(intent);
} else if (quality == DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) {
mChooseLockSettingsHelper.utils().clearLock(false);