Update credential removal strings
1) Credential can no longer be removed for separate challenge profiles, so strings and supporting logic are also now removed 2) Updates existing strings for credential and fingerprint 3) Adds new strings for face 4) Adds new strings for face + fingerprint Bug: 185180691 Test: manual on device Change-Id: I2a850eb6644103e14ef2a670222e500c705a16cd
This commit is contained in:
@@ -975,31 +975,38 @@ public class ChooseLockGeneric extends SettingsActivity {
|
||||
|
||||
private int getResIdForFactoryResetProtectionWarningMessage() {
|
||||
final boolean hasFingerprints;
|
||||
final boolean hasFace;
|
||||
if (mFingerprintManager != null && mFingerprintManager.isHardwareDetected()) {
|
||||
hasFingerprints = mFingerprintManager.hasEnrolledFingerprints(mUserId);
|
||||
} else {
|
||||
hasFingerprints = false;
|
||||
}
|
||||
|
||||
if (mFaceManager != null && mFaceManager.isHardwareDetected()) {
|
||||
hasFace = mFaceManager.hasEnrolledTemplates(mUserId);
|
||||
} else {
|
||||
hasFace = false;
|
||||
}
|
||||
|
||||
switch (mLockPatternUtils.getKeyguardStoredPasswordQuality(mUserId)) {
|
||||
case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
|
||||
if (hasFingerprints && mIsManagedProfile) {
|
||||
return R.string
|
||||
.unlock_disable_frp_warning_content_pattern_fingerprint_profile;
|
||||
} else if (hasFingerprints && !mIsManagedProfile) {
|
||||
if (hasFingerprints && hasFace) {
|
||||
return R.string.unlock_disable_frp_warning_content_pattern_face_fingerprint;
|
||||
} else if (hasFingerprints) {
|
||||
return R.string.unlock_disable_frp_warning_content_pattern_fingerprint;
|
||||
} else if (mIsManagedProfile) {
|
||||
return R.string.unlock_disable_frp_warning_content_pattern_profile;
|
||||
} else if (hasFace) {
|
||||
return R.string.unlock_disable_frp_warning_content_pattern_face;
|
||||
} else {
|
||||
return R.string.unlock_disable_frp_warning_content_pattern;
|
||||
}
|
||||
case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC:
|
||||
case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX:
|
||||
if (hasFingerprints && mIsManagedProfile) {
|
||||
return R.string.unlock_disable_frp_warning_content_pin_fingerprint_profile;
|
||||
} else if (hasFingerprints && !mIsManagedProfile) {
|
||||
if (hasFingerprints && hasFace) {
|
||||
return R.string.unlock_disable_frp_warning_content_pin_face_fingerprint;
|
||||
} else if (hasFingerprints) {
|
||||
return R.string.unlock_disable_frp_warning_content_pin_fingerprint;
|
||||
} else if (mIsManagedProfile) {
|
||||
return R.string.unlock_disable_frp_warning_content_pin_profile;
|
||||
} else if (hasFace) {
|
||||
return R.string.unlock_disable_frp_warning_content_pin_face;
|
||||
} else {
|
||||
return R.string.unlock_disable_frp_warning_content_pin;
|
||||
}
|
||||
@@ -1007,24 +1014,23 @@ public class ChooseLockGeneric extends SettingsActivity {
|
||||
case DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC:
|
||||
case DevicePolicyManager.PASSWORD_QUALITY_COMPLEX:
|
||||
case DevicePolicyManager.PASSWORD_QUALITY_MANAGED:
|
||||
if (hasFingerprints && mIsManagedProfile) {
|
||||
if (hasFingerprints && hasFace) {
|
||||
return R.string
|
||||
.unlock_disable_frp_warning_content_password_fingerprint_profile;
|
||||
} else if (hasFingerprints && !mIsManagedProfile) {
|
||||
.unlock_disable_frp_warning_content_password_face_fingerprint;
|
||||
} else if (hasFingerprints) {
|
||||
return R.string.unlock_disable_frp_warning_content_password_fingerprint;
|
||||
} else if (mIsManagedProfile) {
|
||||
return R.string.unlock_disable_frp_warning_content_password_profile;
|
||||
} else if (hasFace) {
|
||||
return R.string.unlock_disable_frp_warning_content_password_face;
|
||||
} else {
|
||||
return R.string.unlock_disable_frp_warning_content_password;
|
||||
}
|
||||
default:
|
||||
if (hasFingerprints && mIsManagedProfile) {
|
||||
return R.string
|
||||
.unlock_disable_frp_warning_content_unknown_fingerprint_profile;
|
||||
} else if (hasFingerprints && !mIsManagedProfile) {
|
||||
if (hasFingerprints && hasFace) {
|
||||
return R.string.unlock_disable_frp_warning_content_unknown_face_fingerprint;
|
||||
} else if (hasFingerprints) {
|
||||
return R.string.unlock_disable_frp_warning_content_unknown_fingerprint;
|
||||
} else if (mIsManagedProfile) {
|
||||
return R.string.unlock_disable_frp_warning_content_unknown_profile;
|
||||
} else if (hasFace) {
|
||||
return R.string.unlock_disable_frp_warning_content_unknown_face;
|
||||
} else {
|
||||
return R.string.unlock_disable_frp_warning_content_unknown;
|
||||
}
|
||||
|
Reference in New Issue
Block a user