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,15 +242,21 @@ public final class CredentialStorage extends FragmentActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDismiss(DialogInterface dialog) {
|
public void onDismiss(DialogInterface dialog) {
|
||||||
if (mResetConfirmed) {
|
if (!mResetConfirmed) {
|
||||||
mResetConfirmed = false;
|
finish();
|
||||||
if (confirmKeyGuard(CONFIRM_CLEAR_SYSTEM_CREDENTIAL_REQUEST)) {
|
|
||||||
// will return password value via onActivityResult
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
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();
|
finish();
|
||||||
}
|
}
|
||||||
|
// Confirmation result will be handled in onActivityResult if needed.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user