Merge "FRP: Add dedicated explanation strings for ConfirmCredential" into oc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a147d4a616
@@ -3500,6 +3500,20 @@
|
||||
continue. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_strong_auth_required_work_password">For added security, enter your work password</string>
|
||||
|
||||
<!-- An explanation text that the pattern needs to be solved because the device was factory reset. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_confirm_your_pattern_details_frp">Your phone was reset to factory settings. To use this phone, enter your previous pattern.</string>
|
||||
<!-- An explanation text that the pin needs to be solved because the device was factory reset. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_confirm_your_pin_details_frp">Your phone was reset to factory settings. To use this phone, enter your previous PIN.</string>
|
||||
<!-- An explanation text that the password needs to be solved because the device was factory reset. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_confirm_your_password_details_frp">Your phone was reset to factory settings. To use this phone, enter your previous password.</string>
|
||||
|
||||
<!-- Header shown when pattern needs to be solved because the device was factory reset. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_confirm_your_pattern_header_frp">Verify pattern</string>
|
||||
<!-- Header shown when the pin needs to be solved because the device was factory reset. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_confirm_your_pin_header_frp">Verify PIN</string>
|
||||
<!-- Header shown when the password needs to be solved because the device was factory reset. [CHAR LIMIT=100] -->
|
||||
<string name="lockpassword_confirm_your_password_header_frp">Verify password</string>
|
||||
|
||||
<!-- Security & location settings screen, change security method screen instruction if user
|
||||
enters incorrect PIN [CHAR LIMIT=30] -->
|
||||
<string name="lockpassword_invalid_pin">Wrong PIN</string>
|
||||
|
@@ -197,11 +197,19 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
||||
}
|
||||
|
||||
private int getDefaultHeader() {
|
||||
if (mFrp) {
|
||||
return mIsAlpha ? R.string.lockpassword_confirm_your_password_header_frp
|
||||
: R.string.lockpassword_confirm_your_pin_header_frp;
|
||||
}
|
||||
return mIsAlpha ? R.string.lockpassword_confirm_your_password_header
|
||||
: R.string.lockpassword_confirm_your_pin_header;
|
||||
}
|
||||
|
||||
private int getDefaultDetails() {
|
||||
if (mFrp) {
|
||||
return mIsAlpha ? R.string.lockpassword_confirm_your_password_details_frp
|
||||
: R.string.lockpassword_confirm_your_pin_details_frp;
|
||||
}
|
||||
boolean isStrongAuthRequired = isStrongAuthRequired();
|
||||
boolean isProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
|
||||
// Map boolean flags to an index by isStrongAuth << 2 + isProfile << 1 + isAlpha.
|
||||
|
@@ -243,6 +243,9 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
}
|
||||
|
||||
private int getDefaultDetails() {
|
||||
if (mFrp) {
|
||||
return R.string.lockpassword_confirm_your_pattern_details_frp;
|
||||
}
|
||||
final boolean isStrongAuthRequired = isStrongAuthRequired();
|
||||
if (UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId)) {
|
||||
return isStrongAuthRequired
|
||||
@@ -296,7 +299,7 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
if (mHeaderText != null) {
|
||||
mHeaderTextView.setText(mHeaderText);
|
||||
} else {
|
||||
mHeaderTextView.setText(R.string.lockpassword_confirm_your_pattern_header);
|
||||
mHeaderTextView.setText(getDefaultHeader());
|
||||
}
|
||||
if (mDetailsText != null) {
|
||||
mDetailsTextView.setText(mDetailsText);
|
||||
@@ -331,6 +334,11 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
||||
mHeaderTextView.announceForAccessibility(mHeaderTextView.getText());
|
||||
}
|
||||
|
||||
private int getDefaultHeader() {
|
||||
return mFrp ? R.string.lockpassword_confirm_your_pattern_header_frp
|
||||
: R.string.lockpassword_confirm_your_pattern_header;
|
||||
}
|
||||
|
||||
private Runnable mClearPatternRunnable = new Runnable() {
|
||||
public void run() {
|
||||
mLockPatternView.clearPattern();
|
||||
|
Reference in New Issue
Block a user