Do not reset incorrect password attempts after biometric authentication
For work challenges, do not reset incorrect password attempts if challenge is resolved via biometric authentication. This is the behaviour for personal keyguard and work challenge should be consistent. Bug: 139438785 Test: manual: enroll work challenge with fingerprint, set failed wipe count (3) via TestDPC and attempt two failed attempts (via cmd lock_settings). Resolve work challenge with fingerprint and attempt one last failed attempt. Verify work profiel is wiped. Change-Id: Ic64d3e44f3faa5adf8ac43db09e33c8403427990
This commit is contained in:
@@ -20,6 +20,7 @@ import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityOptions;
|
||||
import android.app.IActivityManager;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentSender;
|
||||
import android.os.RemoteException;
|
||||
@@ -54,8 +55,12 @@ public class ConfirmDeviceCredentialUtils {
|
||||
}
|
||||
|
||||
public static void reportSuccessfulAttempt(LockPatternUtils utils, UserManager userManager,
|
||||
int userId) {
|
||||
utils.reportSuccessfulPasswordAttempt(userId);
|
||||
DevicePolicyManager dpm, int userId, boolean isStrongAuth) {
|
||||
if (isStrongAuth) {
|
||||
utils.reportSuccessfulPasswordAttempt(userId);
|
||||
} else {
|
||||
dpm.reportSuccessfulBiometricAttempt(userId);
|
||||
}
|
||||
if (userManager.isManagedProfile(userId)) {
|
||||
// Keyguard is responsible to disable StrongAuth for primary user. Disable StrongAuth
|
||||
// for work challenge only here.
|
||||
|
Reference in New Issue
Block a user