Skip to content

Commit 8d8e669

Browse files
Danielle MillettAndroid (Google) Code Review
authored andcommitted
Merge "DO NOT MERGE cherry picking from MR0 cl 148223" into ics-mr0
2 parents 8d00c19 + 0cdbc3d commit 8d8e669

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

core/java/com/android/internal/widget/LockPatternUtils.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -438,17 +438,6 @@ public void saveLockPattern(List<LockPatternView.Cell> pattern) {
438438
this.saveLockPattern(pattern, false);
439439
}
440440

441-
/**
442-
* Calls back SetupFaceLock to save the temporary gallery file if this is the backup lock.
443-
* This doesn't have to verify that biometric is enabled because it's only called in that case
444-
*/
445-
void moveTempGallery() {
446-
Intent intent = new Intent().setClassName("com.android.facelock",
447-
"com.android.facelock.SetupFaceLock");
448-
intent.putExtra("moveTempGallery", true);
449-
mContext.startActivity(intent);
450-
}
451-
452441
/**
453442
* Calls back SetupFaceLock to delete the temporary gallery file
454443
*/
@@ -501,8 +490,7 @@ public void saveLockPattern(List<LockPatternView.Cell> pattern, boolean isFallba
501490
setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK);
502491
setLong(PASSWORD_TYPE_ALTERNATE_KEY,
503492
DevicePolicyManager.PASSWORD_QUALITY_SOMETHING);
504-
setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
505-
moveTempGallery();
493+
finishBiometricWeak();
506494
}
507495
dpm.setActivePasswordState(DevicePolicyManager.PASSWORD_QUALITY_SOMETHING, pattern
508496
.size(), 0, 0, 0, 0, 0, 0);
@@ -619,8 +607,7 @@ public void saveLockPassword(String password, int quality, boolean isFallback) {
619607
} else {
620608
setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK);
621609
setLong(PASSWORD_TYPE_ALTERNATE_KEY, Math.max(quality, computedQuality));
622-
setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
623-
moveTempGallery();
610+
finishBiometricWeak();
624611
}
625612
if (computedQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) {
626613
int letters = 0;
@@ -1087,4 +1074,16 @@ public boolean resumeCall() {
10871074
}
10881075
return false;
10891076
}
1077+
1078+
private void finishBiometricWeak() {
1079+
setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
1080+
1081+
// Launch intent to show final screen, this also
1082+
// moves the temporary gallery to the actual gallery
1083+
Intent intent = new Intent();
1084+
intent.setClassName("com.android.facelock",
1085+
"com.android.facelock.SetupEndScreen");
1086+
mContext.startActivity(intent);
1087+
}
1088+
10901089
}

0 commit comments

Comments
 (0)