Remove subtext from work challenge screens
Bug: 201045654 Test: manual Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password Change-Id: Ibd65e27d5ed2762d04aa7750908506d0353a0727
This commit is contained in:
@@ -4386,25 +4386,6 @@
|
||||
<!-- Header on first screen of choose work profile pattern flow [CHAR LIMIT=40] -->
|
||||
<string name="lockpassword_choose_your_profile_pattern_header">Set a work pattern</string>
|
||||
|
||||
<!-- Header on first screen of choose device password flow [CHAR LIMIT=NONE] -->
|
||||
<string name="lockpassword_choose_password_description" product="phone">For added security, set a password to unlock the phone</string>
|
||||
<!-- Header on first screen of choose device PIN flow [CHAR LIMIT=NONE] -->
|
||||
<string name="lockpassword_choose_pin_description" product="phone">For added security, set a PIN to unlock the phone</string>
|
||||
<!-- Header on first screen of choose device pattern flow [CHAR LIMIT=NONE] -->
|
||||
<string name="lockpattern_choose_pattern_description" product="phone">For added security, set a pattern to unlock the phone</string>
|
||||
<!-- Header on first screen of choose device password flow [CHAR LIMIT=NONE] -->
|
||||
<string name="lockpassword_choose_password_description" product="tablet">For added security, set a password to unlock the tablet</string>
|
||||
<!-- Header on first screen of choose device PIN flow [CHAR LIMIT=NONE] -->
|
||||
<string name="lockpassword_choose_pin_description" product="tablet">For added security, set a PIN to unlock the tablet</string>
|
||||
<!-- Header on first screen of choose device pattern flow [CHAR LIMIT=NONE] -->
|
||||
<string name="lockpattern_choose_pattern_description" product="tablet">For added security, set a pattern to unlock the tablet</string>
|
||||
<!-- Header on first screen of choose device password flow [CHAR LIMIT=NONE] -->
|
||||
<string name="lockpassword_choose_password_description" product="default">For added security, set a password to unlock the device</string>
|
||||
<!-- Header on first screen of choose device PIN flow [CHAR LIMIT=NONE] -->
|
||||
<string name="lockpassword_choose_pin_description" product="default">For added security, set a PIN to unlock the device</string>
|
||||
<!-- Header on first screen of choose device pattern flow [CHAR LIMIT=NONE] -->
|
||||
<string name="lockpattern_choose_pattern_description" product="default">For added security, set a pattern to unlock the device</string>
|
||||
|
||||
<!-- Header on first screen of choose password/PIN as backup for fingerprint flow. If this string cannot be translated in under 40 characters, please translate "Set fingerprint backup" [CHAR LIMIT=40] -->
|
||||
<string name="lockpassword_choose_your_password_header_for_fingerprint">To use fingerprint, set password</string>
|
||||
<!-- Header on first screen of choose pattern as backup for fingerprint flow. If this string cannot be translated in under 40 characters, please translate "Set fingerprint backup" [CHAR LIMIT=40] -->
|
||||
|
@@ -268,9 +268,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
R.string.lockpassword_choose_your_pin_header_for_fingerprint,
|
||||
R.string.lockpassword_choose_your_pin_header_for_face,
|
||||
R.string.lockpassword_choose_your_pin_header_for_biometrics,
|
||||
R.string.lockpassword_choose_password_description,
|
||||
R.string.lock_settings_picker_biometrics_added_security_message,
|
||||
R.string.lockpassword_choose_pin_description,
|
||||
R.string.lock_settings_picker_biometrics_added_security_message,
|
||||
R.string.next_label),
|
||||
|
||||
@@ -287,8 +285,6 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
R.string.lockpassword_confirm_your_pin_header,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
R.string.lockpassword_confirm_label),
|
||||
|
||||
ConfirmWrong(
|
||||
@@ -304,8 +300,6 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
R.string.lockpassword_confirm_pins_dont_match,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
R.string.lockpassword_confirm_label);
|
||||
|
||||
Stage(int hintInAlpha,
|
||||
@@ -318,9 +312,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
int hintInNumericForFingerprint,
|
||||
int hintInNumericForFace,
|
||||
int hintInNumericForBiometrics,
|
||||
int messageInAlpha,
|
||||
int messageInAlphaForBiometrics,
|
||||
int messageInNumeric,
|
||||
int messageInNumericForBiometrics,
|
||||
int nextButtonText) {
|
||||
|
||||
@@ -336,10 +328,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
this.numericHintForFace = hintInNumericForFace;
|
||||
this.numericHintForBiometrics = hintInNumericForBiometrics;
|
||||
|
||||
this.alphaMessage = messageInAlpha;
|
||||
this.alphaMessageForBiometrics = messageInAlphaForBiometrics;
|
||||
|
||||
this.numericMessage = messageInNumeric;
|
||||
this.numericMessageForBiometrics = messageInNumericForBiometrics;
|
||||
|
||||
this.buttonText = nextButtonText;
|
||||
@@ -365,11 +354,9 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
public final int numericHintForBiometrics;
|
||||
|
||||
// Password description
|
||||
public final int alphaMessage;
|
||||
public final int alphaMessageForBiometrics;
|
||||
|
||||
// PIN description
|
||||
public final int numericMessage;
|
||||
public final int numericMessageForBiometrics;
|
||||
|
||||
public final int buttonText;
|
||||
@@ -407,7 +394,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
|
||||
case TYPE_NONE:
|
||||
default:
|
||||
return isAlpha ? alphaMessage : numericMessage;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -869,13 +856,18 @@ public class ChooseLockPassword extends SettingsActivity {
|
||||
setNextEnabled(canInput && length >= LockPatternUtils.MIN_LOCK_PASSWORD_SIZE);
|
||||
mSkipOrClearButton.setVisibility(toVisibility(canInput && length > 0));
|
||||
}
|
||||
int message = mUiStage.getMessage(mIsAlphaMode, getStageType());
|
||||
final int stage = getStageType();
|
||||
if (getStageType() != Stage.TYPE_NONE) {
|
||||
int message = mUiStage.getMessage(mIsAlphaMode, stage);
|
||||
if (message != 0) {
|
||||
mMessage.setVisibility(View.VISIBLE);
|
||||
mMessage.setText(message);
|
||||
} else {
|
||||
mMessage.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
} else {
|
||||
mMessage.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
setNextText(mUiStage.buttonText);
|
||||
mPasswordEntryInputDisabler.setInputEnabled(canInput);
|
||||
|
@@ -363,54 +363,49 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
|
||||
Introduction(
|
||||
R.string.lock_settings_picker_biometrics_added_security_message,
|
||||
R.string.lockpattern_choose_pattern_description,
|
||||
R.string.lockpattern_recording_intro_header,
|
||||
LeftButtonMode.Gone, RightButtonMode.ContinueDisabled,
|
||||
ID_EMPTY_MESSAGE, true),
|
||||
HelpScreen(
|
||||
ID_EMPTY_MESSAGE, ID_EMPTY_MESSAGE, R.string.lockpattern_settings_help_how_to_record,
|
||||
ID_EMPTY_MESSAGE, R.string.lockpattern_settings_help_how_to_record,
|
||||
LeftButtonMode.Gone, RightButtonMode.Ok, ID_EMPTY_MESSAGE, false),
|
||||
ChoiceTooShort(
|
||||
R.string.lock_settings_picker_biometrics_added_security_message,
|
||||
R.string.lockpattern_choose_pattern_description,
|
||||
R.string.lockpattern_recording_incorrect_too_short,
|
||||
LeftButtonMode.Retry, RightButtonMode.ContinueDisabled,
|
||||
ID_EMPTY_MESSAGE, true),
|
||||
FirstChoiceValid(
|
||||
R.string.lock_settings_picker_biometrics_added_security_message,
|
||||
R.string.lockpattern_choose_pattern_description,
|
||||
R.string.lockpattern_pattern_entered_header,
|
||||
LeftButtonMode.Retry, RightButtonMode.Continue, ID_EMPTY_MESSAGE, false),
|
||||
NeedToConfirm(
|
||||
ID_EMPTY_MESSAGE, ID_EMPTY_MESSAGE, R.string.lockpattern_need_to_confirm,
|
||||
ID_EMPTY_MESSAGE, R.string.lockpattern_need_to_confirm,
|
||||
LeftButtonMode.Gone, RightButtonMode.ConfirmDisabled,
|
||||
ID_EMPTY_MESSAGE, true),
|
||||
ConfirmWrong(
|
||||
ID_EMPTY_MESSAGE, ID_EMPTY_MESSAGE, R.string.lockpattern_need_to_unlock_wrong,
|
||||
ID_EMPTY_MESSAGE, R.string.lockpattern_need_to_unlock_wrong,
|
||||
LeftButtonMode.Gone, RightButtonMode.ConfirmDisabled,
|
||||
ID_EMPTY_MESSAGE, true),
|
||||
ChoiceConfirmed(
|
||||
ID_EMPTY_MESSAGE, ID_EMPTY_MESSAGE, R.string.lockpattern_pattern_confirmed_header,
|
||||
ID_EMPTY_MESSAGE, R.string.lockpattern_pattern_confirmed_header,
|
||||
LeftButtonMode.Gone, RightButtonMode.Confirm, ID_EMPTY_MESSAGE, false);
|
||||
|
||||
|
||||
/**
|
||||
* @param messageForBiometrics The message displayed at the top, above header for
|
||||
* fingerprint flow.
|
||||
* @param message The message displayed at the top.
|
||||
* @param headerMessage The message displayed at the top.
|
||||
* @param leftMode The mode of the left button.
|
||||
* @param rightMode The mode of the right button.
|
||||
* @param footerMessage The footer message.
|
||||
* @param patternEnabled Whether the pattern widget is enabled.
|
||||
*/
|
||||
Stage(int messageForBiometrics, int message, int headerMessage,
|
||||
Stage(int messageForBiometrics, int headerMessage,
|
||||
LeftButtonMode leftMode,
|
||||
RightButtonMode rightMode,
|
||||
int footerMessage, boolean patternEnabled) {
|
||||
this.headerMessage = headerMessage;
|
||||
this.messageForBiometrics = messageForBiometrics;
|
||||
this.message = message;
|
||||
this.leftMode = leftMode;
|
||||
this.rightMode = rightMode;
|
||||
this.footerMessage = footerMessage;
|
||||
@@ -419,7 +414,6 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
|
||||
final int headerMessage;
|
||||
final int messageForBiometrics;
|
||||
final int message;
|
||||
final LeftButtonMode leftMode;
|
||||
final RightButtonMode rightMode;
|
||||
final int footerMessage;
|
||||
@@ -735,11 +729,14 @@ public class ChooseLockPattern extends SettingsActivity {
|
||||
}
|
||||
final GlifLayout layout = getActivity().findViewById(R.id.setup_wizard_layout);
|
||||
final boolean forAnyBiometric = mForFingerprint || mForFace || mForBiometrics;
|
||||
int message = forAnyBiometric ? stage.messageForBiometrics : stage.message;
|
||||
if (message == ID_EMPTY_MESSAGE) {
|
||||
if (forAnyBiometric) {
|
||||
if (stage.messageForBiometrics == ID_EMPTY_MESSAGE) {
|
||||
layout.setDescriptionText("");
|
||||
} else {
|
||||
layout.setDescriptionText(message);
|
||||
layout.setDescriptionText(stage.messageForBiometrics);
|
||||
}
|
||||
} else {
|
||||
layout.getDescriptionTextView().setVisibility(View.GONE);
|
||||
}
|
||||
if (stage.footerMessage == ID_EMPTY_MESSAGE) {
|
||||
mFooterText.setText("");
|
||||
|
@@ -142,14 +142,8 @@ public class SetupChooseLockPattern extends ChooseLockPattern {
|
||||
mLeftButtonIsSkip = false;
|
||||
}
|
||||
|
||||
// Show generic pattern message when pattern lock screen launch in Setup wizard flow
|
||||
// before fingerprint and face setup.
|
||||
final GlifLayout layout = getActivity().findViewById(R.id.setup_wizard_layout);
|
||||
if (stage.message == ID_EMPTY_MESSAGE) {
|
||||
layout.setDescriptionText("");
|
||||
} else {
|
||||
layout.setDescriptionText(stage.message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user