diff --git a/res/values/strings.xml b/res/values/strings.xml
index f9e9c89..b3198c7 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -637,6 +637,9 @@
 
     <!-- Security Settings --><skip />
 
+    <!-- Security settings screen when using face unlock, setting option name to start an activity that allows the user to improve accuracy by adding additional enrollment faces -->
+    <string name="biometric_weak_improve_matching_title">Improve face matching</string>
+
     <!-- Security settings screen, setting option name to change screen timeout -->
     <string name="lock_after_timeout">Automatically lock</string>
     <!-- Security settings screen, setting option summary to change screen timeout -->
diff --git a/res/xml/security_settings_biometric_weak.xml b/res/xml/security_settings_biometric_weak.xml
index 14d28f2..7d832e4 100644
--- a/res/xml/security_settings_biometric_weak.xml
+++ b/res/xml/security_settings_biometric_weak.xml
@@ -26,6 +26,10 @@
             android:summary="@string/unlock_set_unlock_mode_biometric_weak"
             android:persistent="false"/>
 
+        <PreferenceScreen
+            android:key="biometric_weak_improve_matching"
+            android:title="@string/biometric_weak_improve_matching_title"/>
+
         <CheckBoxPreference
             android:key="visiblepattern"
             android:title="@string/lockpattern_settings_enable_visible_pattern_title"/>
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java
index fb4a5cd..df421a2 100644
--- a/src/com/android/settings/ChooseLockGeneric.java
+++ b/src/com/android/settings/ChooseLockGeneric.java
@@ -276,7 +276,7 @@
                     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 @@
             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 @@
                     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);
diff --git a/src/com/android/settings/ChooseLockPassword.java b/src/com/android/settings/ChooseLockPassword.java
index abff0ae..2940442 100644
--- a/src/com/android/settings/ChooseLockPassword.java
+++ b/src/com/android/settings/ChooseLockPassword.java
@@ -44,7 +44,6 @@
 import android.widget.Button;
 import android.widget.TextView;
 import android.widget.TextView.OnEditorActionListener;
-import android.widget.Toast;
 
 public class ChooseLockPassword extends PreferenceActivity {
     public static final String PASSWORD_MIN_KEY = "lockscreen.password_min";
@@ -388,7 +387,6 @@
                             LockPatternUtils.LOCKSCREEN_BIOMETRIC_WEAK_FALLBACK, false);
                     mLockPatternUtils.clearLock(isFallback);
                     mLockPatternUtils.saveLockPassword(pin, mRequestedQuality, isFallback);
-                    Toast.makeText(getActivity(), R.string.lock_setup, Toast.LENGTH_SHORT).show();
                     getActivity().finish();
                 } else {
                     updateStage(Stage.ConfirmWrong);
diff --git a/src/com/android/settings/ChooseLockPattern.java b/src/com/android/settings/ChooseLockPattern.java
index 314a432..180eee1 100644
--- a/src/com/android/settings/ChooseLockPattern.java
+++ b/src/com/android/settings/ChooseLockPattern.java
@@ -35,7 +35,6 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.TextView;
-import android.widget.Toast;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -513,8 +512,6 @@
             utils.saveLockPattern(mChosenPattern, isFallback);
             utils.setLockPatternEnabled(true);
 
-            Toast.makeText(getActivity(), R.string.lock_setup, Toast.LENGTH_SHORT).show();
-
             if (lockVirgin) {
                 utils.setVisiblePatternEnabled(true);
                 utils.setTactileFeedbackEnabled(false);
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 @@
 
 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 @@
 
     // 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 @@
         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 @@
     @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 @@
         }
         return true;
     }
+
+    public void startBiometricWeakImprove(){
+        Intent intent = new Intent();
+        intent.setClassName("com.android.facelock", "com.android.facelock.AddToSetup");
+        startActivity(intent);
+    }
 }
