diff options
author | Danielle Millett <dmillett@google.com> | 2011-11-02 11:12:21 -0400 |
---|---|---|
committer | Danielle Millett <dmillett@google.com> | 2011-11-07 17:29:22 -0500 |
commit | 487b16f3400b62b79f8108ca669cc3e937c69def (patch) | |
tree | e7e8c01e44b06046c9577afda6b14d4af461b2f5 /src/com/android/settings/SecuritySettings.java | |
parent | 8214d201db04c27ed82265ec46f85a87f1adf179 (diff) | |
download | packages_apps_settings-487b16f3400b62b79f8108ca669cc3e937c69def.zip packages_apps_settings-487b16f3400b62b79f8108ca669cc3e937c69def.tar.gz packages_apps_settings-487b16f3400b62b79f8108ca669cc3e937c69def.tar.bz2 |
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
Diffstat (limited to 'src/com/android/settings/SecuritySettings.java')
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index 5df5805..ab58dd5 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -19,6 +19,7 @@ package com.android.settings; import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT; +import android.app.Activity; import android.app.AlertDialog; import android.app.admin.DevicePolicyManager; import android.content.Context; @@ -50,12 +51,15 @@ public class SecuritySettings extends SettingsPreferenceFragment // Lock Settings private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change"; + private static final String KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING = + "biometric_weak_improve_matching"; private static final String KEY_LOCK_ENABLED = "lockenabled"; private static final String KEY_VISIBLE_PATTERN = "visiblepattern"; private static final String KEY_TACTILE_FEEDBACK_ENABLED = "unlock_tactile_feedback"; private static final String KEY_SECURITY_CATEGORY = "security_category"; private static final String KEY_LOCK_AFTER_TIMEOUT = "lock_after_timeout"; private static final int SET_OR_CHANGE_LOCK_METHOD_REQUEST = 123; + private static final int CONFIRM_EXISTING_FOR_BIOMETRIC_IMPROVE_REQUEST = 124; // Misc Settings private static final String KEY_SIM_LOCK = "sim_lock"; @@ -326,6 +330,13 @@ public class SecuritySettings extends SettingsPreferenceFragment if (KEY_UNLOCK_SET_OR_CHANGE.equals(key)) { startFragment(this, "com.android.settings.ChooseLockGeneric$ChooseLockGenericFragment", SET_OR_CHANGE_LOCK_METHOD_REQUEST, null); + } else if (KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING.equals(key)) { + ChooseLockSettingsHelper helper = + new ChooseLockSettingsHelper(this.getActivity(), this); + if (!helper.launchConfirmationActivity( + CONFIRM_EXISTING_FOR_BIOMETRIC_IMPROVE_REQUEST, null, null)) { + startBiometricWeakImprove(); // no password set, so no need to confirm + } } else if (KEY_LOCK_ENABLED.equals(key)) { lockPatternUtils.setLockPatternEnabled(isToggled(preference)); } else if (KEY_VISIBLE_PATTERN.equals(key)) { @@ -360,6 +371,11 @@ public class SecuritySettings extends SettingsPreferenceFragment @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); + if (requestCode == CONFIRM_EXISTING_FOR_BIOMETRIC_IMPROVE_REQUEST && + resultCode == Activity.RESULT_OK) { + startBiometricWeakImprove(); + return; + } createPreferenceHierarchy(); } @@ -376,4 +392,10 @@ public class SecuritySettings extends SettingsPreferenceFragment } return true; } + + public void startBiometricWeakImprove(){ + Intent intent = new Intent(); + intent.setClassName("com.android.facelock", "com.android.facelock.AddToSetup"); + startActivity(intent); + } } |