Credential storage: check lock quality for right user
Checking the wrong user can lead to an infinite loop when trying to install credentials from a managed profile. Bug: 28043334 Change-Id: I3e1044069f0d5139a47de461996a6d98e0fe5e2f
This commit is contained in:
@@ -208,9 +208,9 @@ public final class CredentialStorage extends Activity {
|
||||
* Returns true if the currently set key guard matches our minimum quality requirements.
|
||||
*/
|
||||
private boolean checkKeyGuardQuality() {
|
||||
UserInfo parent = UserManager.get(this).getProfileParent(UserHandle.myUserId());
|
||||
int quality = new LockPatternUtils(this).getActivePasswordQuality(
|
||||
parent != null ? parent.id : UserHandle.myUserId());
|
||||
int credentialOwner =
|
||||
UserManager.get(this).getCredentialOwnerProfile(UserHandle.myUserId());
|
||||
int quality = new LockPatternUtils(this).getActivePasswordQuality(credentialOwner);
|
||||
return (quality >= MIN_PASSWORD_QUALITY);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user