Merge "Respect PASSWORD_QUALITY_MANAGED for biometrics" into sc-qpr1-dev am: a238881ee0 am: d730a09568 am: 58ac1483e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15778512 Change-Id: Id0dbd193a8bd961451451fcd74756d7a9c2fd7e4
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.internal.widget;
|
||||
|
||||
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC;
|
||||
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_MANAGED;
|
||||
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_NUMERIC;
|
||||
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX;
|
||||
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_SOMETHING;
|
||||
@@ -1263,6 +1264,14 @@ public class LockPatternUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the user is not allowed to set any credentials via PASSWORD_QUALITY_MANAGED.
|
||||
*/
|
||||
public boolean isCredentialsDisabledForUser(int userId) {
|
||||
return getDevicePolicyManager().getPasswordQuality(/* admin= */ null, userId)
|
||||
== PASSWORD_QUALITY_MANAGED;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see StrongAuthTracker#isTrustAllowedForUser
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user