Merge "Allow user without a password to clear credentials" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
0c6ead9e61
@@ -242,14 +242,20 @@ public final class CredentialStorage extends FragmentActivity {
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
if (mResetConfirmed) {
|
||||
mResetConfirmed = false;
|
||||
if (confirmKeyGuard(CONFIRM_CLEAR_SYSTEM_CREDENTIAL_REQUEST)) {
|
||||
// will return password value via onActivityResult
|
||||
return;
|
||||
}
|
||||
if (!mResetConfirmed) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
finish();
|
||||
|
||||
mResetConfirmed = false;
|
||||
if (!mUtils.isSecure(UserHandle.myUserId())) {
|
||||
// This task will call finish() in the end.
|
||||
new ResetKeyStoreAndKeyChain().execute();
|
||||
} else if (!confirmKeyGuard(CONFIRM_CLEAR_SYSTEM_CREDENTIAL_REQUEST)) {
|
||||
Log.w(TAG, "Failed to launch credential confirmation for a secure user.");
|
||||
finish();
|
||||
}
|
||||
// Confirmation result will be handled in onActivityResult if needed.
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user