Merge "Add special lock screen prompt strings for strong auth."
This commit is contained in:
committed by
Android (Google) Code Review
commit
740405a044
@@ -3457,19 +3457,34 @@
|
||||
particular operation. [CHAR LIMIT=70]-->
|
||||
<string name="lockpassword_confirm_your_password_generic_profile">Enter your work password to continue</string>
|
||||
|
||||
<!-- An explanation text that the pattern needs to be solved since the device has just been restarted. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_reason_restart_device_pattern">Use your device pattern to continue. Required after device restarts.</string>
|
||||
<!-- An explanation text that the pin needs to be entered since the device has just been restarted. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_reason_restart_device_pin">Enter your device PIN to continue. Required after device restarts.</string>
|
||||
<!-- An explanation text that the password needs to be entered since the device has just been restarted. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_reason_restart_device_password">Enter your device password to continue. Required after device restarts.</string>
|
||||
<!-- This string shows up on a screen where a user can enter a pattern that
|
||||
unlocks their device. This is an extra security measure that's required for them to
|
||||
continue. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_device_pattern">For added security, use your device pattern</string>
|
||||
<!-- This string shows up on a screen where a user can enter a PIN that unlocks their device.
|
||||
This is an extra security measure that's required for them to continue. [CHAR LIMIT=100]
|
||||
-->
|
||||
<string name="lockpassword_strong_auth_required_device_pin">For added security, enter your device PIN</string>
|
||||
<!-- This string shows up on a screen where a user can enter a password that unlocks their
|
||||
device. This is an extra security measure that's required for them to continue. [CHAR
|
||||
LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_device_password">For added security, enter your device password</string>
|
||||
|
||||
<!-- An explanation text that the pattern needs to be solved since the device has just been restarted. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_reason_restart_work_pattern">Use your work pattern to continue. Required after device restarts.</string>
|
||||
<!-- An explanation text that the pin needs to be entered since the device has just been restarted. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_reason_restart_work_pin">Enter your work PIN to continue. Required after device restarts.</string>
|
||||
<!-- An explanation text that the password needs to be entered since the device has just been restarted. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_reason_restart_work_password">Enter your work password to continue. Required after device restarts.</string>
|
||||
<!-- This string shows up on a screen where a user can enter a pattern that lets them access
|
||||
their work profile, which is a part of their device that's specifically for work apps and
|
||||
managed by their employer. This is an extra security measure that's required for them to
|
||||
continue. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_work_pattern">For added security, use your work pattern</string>
|
||||
<!-- This string shows up on a screen where a user can enter a PIN that lets them access their
|
||||
work profile, which is a part of their device that's specifically for work apps and managed
|
||||
by their employer. This is an extra security measure that's required for them to continue.
|
||||
[CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_work_pin">For added security, enter your work PIN</string>
|
||||
<!-- This string shows up on a screen where a user can enter a password that lets them access
|
||||
their work profile, which is a part of their device that's specifically for work apps and
|
||||
managed by their employer. This is an extra security measure that's required for them to
|
||||
continue. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_work_password">For added security, enter your work password</string>
|
||||
|
||||
<!-- Security & location settings screen, change security method screen instruction if user
|
||||
enters incorrect PIN [CHAR LIMIT=30] -->
|
||||
|
@@ -54,16 +54,15 @@ import java.util.ArrayList;
|
||||
public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
||||
|
||||
// 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[] {
|
||||
R.string.lockpassword_confirm_your_pin_generic,
|
||||
R.string.lockpassword_confirm_your_password_generic,
|
||||
R.string.lockpassword_confirm_your_pin_generic_profile,
|
||||
R.string.lockpassword_confirm_your_password_generic_profile,
|
||||
R.string.lockpassword_confirm_your_pin_generic,
|
||||
R.string.lockpassword_confirm_your_password_generic,
|
||||
R.string.lockpassword_confirm_your_pin_generic_profile,
|
||||
R.string.lockpassword_confirm_your_password_generic_profile,
|
||||
R.string.lockpassword_strong_auth_required_device_pin,
|
||||
R.string.lockpassword_strong_auth_required_device_password,
|
||||
R.string.lockpassword_strong_auth_required_work_pin,
|
||||
R.string.lockpassword_strong_auth_required_work_password,
|
||||
};
|
||||
|
||||
public static class InternalActivity extends ConfirmLockPassword {
|
||||
|
@@ -243,11 +243,15 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
}
|
||||
|
||||
private int getDefaultDetails() {
|
||||
// TODO(b/36511626): add back special strings for strong auth.
|
||||
final boolean isStrongAuthRequired = isStrongAuthRequired();
|
||||
if (UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId)) {
|
||||
return R.string.lockpassword_confirm_your_pattern_generic_profile;
|
||||
return isStrongAuthRequired
|
||||
? R.string.lockpassword_strong_auth_required_work_pattern
|
||||
: R.string.lockpassword_confirm_your_pattern_generic_profile;
|
||||
} else {
|
||||
return R.string.lockpassword_confirm_your_pattern_generic;
|
||||
return isStrongAuthRequired
|
||||
? R.string.lockpassword_strong_auth_required_device_pattern
|
||||
: R.string.lockpassword_confirm_your_pattern_generic;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user