Respect PASSWORD_QUALITY_MANAGED for biometrics

Bug: 195488124
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=\
    com.android.settings.password.ChooseLockGenericControllerTest
Test: manual with a modified TestDPC
Change-Id: Ifa15877c735bb0f396051af04a4e012a606bf9e1
This commit is contained in:
Pavel Grafov
2021-09-07 18:08:36 +01:00
parent 4dde18fc09
commit 36120b8a4c
2 changed files with 16 additions and 1 deletions

View File

@@ -190,7 +190,8 @@ public class ChooseLockGenericController {
* requirements. The lock's visibility ({@link #isScreenLockVisible}) is not considered here.
*/
public boolean isScreenLockEnabled(ScreenLockType type) {
return type.maxQuality >= upgradeQuality(PASSWORD_QUALITY_UNSPECIFIED);
return !mLockPatternUtils.isCredentialsDisabledForUser(mUserId)
&& type.maxQuality >= upgradeQuality(PASSWORD_QUALITY_UNSPECIFIED);
}
/**