Fingerprint should confirm device lock when unified

When unified and adding a fingerprint, the user is prompted to set up
a backup

Bug:27419438
Change-Id: I6cfa8c276ae69a0af51580be390c3da4e9596874
This commit is contained in:
Ricky Wai
2016-04-05 16:33:47 +01:00
parent 4bbf0653c0
commit 996d0dfa6e
5 changed files with 46 additions and 31 deletions

View File

@@ -420,28 +420,32 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
private void startVerifyPattern(final List<LockPatternView.Cell> pattern,
final Intent intent) {
final int localEffectiveUserId = mEffectiveUserId;
final int localUserId = mUserId;
long challenge = getActivity().getIntent().getLongExtra(
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE, 0);
mPendingLockCheck = LockPatternChecker.verifyPattern(
mLockPatternUtils,
pattern,
challenge,
localEffectiveUserId,
new LockPatternChecker.OnVerifyCallback() {
@Override
public void onVerified(byte[] token, int timeoutMs) {
mPendingLockCheck = null;
boolean matched = false;
if (token != null) {
matched = true;
intent.putExtra(
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN,
token);
}
mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
localEffectiveUserId);
final LockPatternChecker.OnVerifyCallback onVerifyCallback =
new LockPatternChecker.OnVerifyCallback() {
@Override
public void onVerified(byte[] token, int timeoutMs) {
mPendingLockCheck = null;
boolean matched = false;
if (token != null) {
matched = true;
intent.putExtra(
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN,
token);
}
});
mCredentialCheckResultTracker.setResult(matched, intent, timeoutMs,
localEffectiveUserId);
}
};
mPendingLockCheck = (localEffectiveUserId == localUserId)
? LockPatternChecker.verifyPattern(
mLockPatternUtils, pattern, challenge, localUserId,
onVerifyCallback)
: LockPatternChecker.verifyTiedProfileChallenge(
mLockPatternUtils, LockPatternUtils.patternToString(pattern),
true, challenge, localUserId, onVerifyCallback);
}
private void startCheckPattern(final List<LockPatternView.Cell> pattern,