FRP: Add dedicated explanation strings for ConfirmCredential
Change-Id: I1bf63898509032560cd302fde9dfe05473336e49 Fixes: 63958816 Test: adb shell settings put global device_provisioned 1 && adb shell am start -a android.app.action.CONFIRM_FRP_CREDENTIAL; verify strings
This commit is contained in:
@@ -3491,6 +3491,20 @@
|
|||||||
continue. [CHAR LIMIT=100] -->
|
continue. [CHAR LIMIT=100] -->
|
||||||
<string name="lockpassword_strong_auth_required_work_password">For added security, enter your work password</string>
|
<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
|
<!-- Security & location settings screen, change security method screen instruction if user
|
||||||
enters incorrect PIN [CHAR LIMIT=30] -->
|
enters incorrect PIN [CHAR LIMIT=30] -->
|
||||||
<string name="lockpassword_invalid_pin">Wrong PIN</string>
|
<string name="lockpassword_invalid_pin">Wrong PIN</string>
|
||||||
|
@@ -197,11 +197,19 @@ public class ConfirmLockPassword extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getDefaultHeader() {
|
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
|
return mIsAlpha ? R.string.lockpassword_confirm_your_password_header
|
||||||
: R.string.lockpassword_confirm_your_pin_header;
|
: R.string.lockpassword_confirm_your_pin_header;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getDefaultDetails() {
|
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 isStrongAuthRequired = isStrongAuthRequired();
|
||||||
boolean isProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
|
boolean isProfile = UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId);
|
||||||
// Map boolean flags to an index by isStrongAuth << 2 + isProfile << 1 + isAlpha.
|
// Map boolean flags to an index by isStrongAuth << 2 + isProfile << 1 + isAlpha.
|
||||||
|
@@ -243,6 +243,9 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getDefaultDetails() {
|
private int getDefaultDetails() {
|
||||||
|
if (mFrp) {
|
||||||
|
return R.string.lockpassword_confirm_your_pattern_details_frp;
|
||||||
|
}
|
||||||
final boolean isStrongAuthRequired = isStrongAuthRequired();
|
final boolean isStrongAuthRequired = isStrongAuthRequired();
|
||||||
if (UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId)) {
|
if (UserManager.get(getActivity()).isManagedProfile(mEffectiveUserId)) {
|
||||||
return isStrongAuthRequired
|
return isStrongAuthRequired
|
||||||
@@ -296,7 +299,7 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
if (mHeaderText != null) {
|
if (mHeaderText != null) {
|
||||||
mHeaderTextView.setText(mHeaderText);
|
mHeaderTextView.setText(mHeaderText);
|
||||||
} else {
|
} else {
|
||||||
mHeaderTextView.setText(R.string.lockpassword_confirm_your_pattern_header);
|
mHeaderTextView.setText(getDefaultHeader());
|
||||||
}
|
}
|
||||||
if (mDetailsText != null) {
|
if (mDetailsText != null) {
|
||||||
mDetailsTextView.setText(mDetailsText);
|
mDetailsTextView.setText(mDetailsText);
|
||||||
@@ -331,6 +334,11 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
|
|||||||
mHeaderTextView.announceForAccessibility(mHeaderTextView.getText());
|
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() {
|
private Runnable mClearPatternRunnable = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
mLockPatternView.clearPattern();
|
mLockPatternView.clearPattern();
|
||||||
|
Reference in New Issue
Block a user