Call reportFailedPasswordAttempt from Work Challenge
Entering the wrong credential in ConfirmDeviceCredentials should also count as failed attempts for the password, after which the DPC have set a restriction to wipe the work profile. Fixed related issues, such as the CredentialChecker re-sending the result after onResume causing additional attempts to be counted. The new error message String is also displayed initially when there are pending attempts to inform the user that they are not starting from fresh. Bug: 26677759 Change-Id: I70cfae4c05e705ad7fe93bc071426459b79e7d0c
This commit is contained in:
@@ -47,7 +47,7 @@ public class CredentialCheckResultTracker extends Fragment {
|
||||
mListener = listener;
|
||||
if (mListener != null && mHasResult) {
|
||||
mListener.onCredentialChecked(mResultMatched, mResultData, mResultTimeoutMs,
|
||||
mResultEffectiveUserId);
|
||||
mResultEffectiveUserId, false /* newResult */);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class CredentialCheckResultTracker extends Fragment {
|
||||
mHasResult = true;
|
||||
if (mListener != null) {
|
||||
mListener.onCredentialChecked(mResultMatched, mResultData, mResultTimeoutMs,
|
||||
mResultEffectiveUserId);
|
||||
mResultEffectiveUserId, true /* newResult */);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ public class CredentialCheckResultTracker extends Fragment {
|
||||
|
||||
interface Listener {
|
||||
public void onCredentialChecked(boolean matched, Intent intent, int timeoutMs,
|
||||
int effectiveUserId);
|
||||
int effectiveUserId, boolean newResult);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user