Disable incorrect strong auth prompt strings.
The prompt strings on the confirm credentials screen (pin, password, pattern) are incorrect. They currently say strong auth is "required after device restarts". But instead they should be "required for additional security" because strong auth can be enforced not only after device or profile restarts, but also after profile key eviction, for example. Unfortunately, we've already missed the window for string changes. Therefore, as an alternative, we use generic prompt strings in this CL, to avoid conveying the incorrect (and misleading) information. We'll follow up with another CL in master with a proper string change to fix the issue. Bug: 36511626 Test: manual Test: make SettingsRoboTests Change-Id: I44f84420b88bb4933ad0afa6e8032af465de0cd3
This commit is contained in:
@@ -53,15 +53,16 @@ import java.util.ArrayList;
|
|||||||
public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
||||||
|
|
||||||
// The index of the array is isStrongAuth << 2 + isProfile << 1 + isAlpha.
|
// The index of the array is isStrongAuth << 2 + isProfile << 1 + isAlpha.
|
||||||
|
// TODO(b/36511626): add back special strings for strong auth.
|
||||||
private static final int[] DETAIL_TEXTS = new int[] {
|
private static final int[] DETAIL_TEXTS = new int[] {
|
||||||
R.string.lockpassword_confirm_your_pin_generic,
|
R.string.lockpassword_confirm_your_pin_generic,
|
||||||
R.string.lockpassword_confirm_your_password_generic,
|
R.string.lockpassword_confirm_your_password_generic,
|
||||||
R.string.lockpassword_confirm_your_pin_generic_profile,
|
R.string.lockpassword_confirm_your_pin_generic_profile,
|
||||||
R.string.lockpassword_confirm_your_password_generic_profile,
|
R.string.lockpassword_confirm_your_password_generic_profile,
|
||||||
R.string.lockpassword_strong_auth_required_reason_restart_device_pin,
|
R.string.lockpassword_confirm_your_pin_generic,
|
||||||
R.string.lockpassword_strong_auth_required_reason_restart_device_password,
|
R.string.lockpassword_confirm_your_password_generic,
|
||||||
R.string.lockpassword_strong_auth_required_reason_restart_work_pin,
|
R.string.lockpassword_confirm_your_pin_generic_profile,
|
||||||
R.string.lockpassword_strong_auth_required_reason_restart_work_password,
|
R.string.lockpassword_confirm_your_password_generic_profile,
|
||||||
};
|
};
|
||||||
|
|
||||||
public static class InternalActivity extends ConfirmLockPassword {
|
public static class InternalActivity extends ConfirmLockPassword {
|
||||||
|
@@ -243,15 +243,11 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getDefaultDetails() {
|
private int getDefaultDetails() {
|
||||||
boolean isStrongAuthRequired = isStrongAuthRequired();
|
// TODO(b/36511626): add back special strings for strong auth.
|
||||||
if (UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId)) {
|
if (UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId)) {
|
||||||
return isStrongAuthRequired
|
return R.string.lockpassword_confirm_your_pattern_generic_profile;
|
||||||
? R.string.lockpassword_strong_auth_required_reason_restart_work_pattern
|
|
||||||
: R.string.lockpassword_confirm_your_pattern_generic_profile;
|
|
||||||
} else {
|
} else {
|
||||||
return isStrongAuthRequired
|
return R.string.lockpassword_confirm_your_pattern_generic;
|
||||||
? R.string.lockpassword_strong_auth_required_reason_restart_device_pattern
|
|
||||||
: R.string.lockpassword_confirm_your_pattern_generic;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user