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] -->
|
<!-- 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>
|
<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] -->
|
<!-- 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>
|
<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] -->
|
<!-- 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_fingerprint,
|
||||||
R.string.lockpassword_choose_your_pin_header_for_face,
|
R.string.lockpassword_choose_your_pin_header_for_face,
|
||||||
R.string.lockpassword_choose_your_pin_header_for_biometrics,
|
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.lock_settings_picker_biometrics_added_security_message,
|
||||||
R.string.lockpassword_choose_pin_description,
|
|
||||||
R.string.lock_settings_picker_biometrics_added_security_message,
|
R.string.lock_settings_picker_biometrics_added_security_message,
|
||||||
R.string.next_label),
|
R.string.next_label),
|
||||||
|
|
||||||
@@ -287,8 +285,6 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
R.string.lockpassword_confirm_your_pin_header,
|
R.string.lockpassword_confirm_your_pin_header,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
0,
|
|
||||||
R.string.lockpassword_confirm_label),
|
R.string.lockpassword_confirm_label),
|
||||||
|
|
||||||
ConfirmWrong(
|
ConfirmWrong(
|
||||||
@@ -304,8 +300,6 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
R.string.lockpassword_confirm_pins_dont_match,
|
R.string.lockpassword_confirm_pins_dont_match,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
|
||||||
0,
|
|
||||||
R.string.lockpassword_confirm_label);
|
R.string.lockpassword_confirm_label);
|
||||||
|
|
||||||
Stage(int hintInAlpha,
|
Stage(int hintInAlpha,
|
||||||
@@ -318,9 +312,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
int hintInNumericForFingerprint,
|
int hintInNumericForFingerprint,
|
||||||
int hintInNumericForFace,
|
int hintInNumericForFace,
|
||||||
int hintInNumericForBiometrics,
|
int hintInNumericForBiometrics,
|
||||||
int messageInAlpha,
|
|
||||||
int messageInAlphaForBiometrics,
|
int messageInAlphaForBiometrics,
|
||||||
int messageInNumeric,
|
|
||||||
int messageInNumericForBiometrics,
|
int messageInNumericForBiometrics,
|
||||||
int nextButtonText) {
|
int nextButtonText) {
|
||||||
|
|
||||||
@@ -336,10 +328,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
this.numericHintForFace = hintInNumericForFace;
|
this.numericHintForFace = hintInNumericForFace;
|
||||||
this.numericHintForBiometrics = hintInNumericForBiometrics;
|
this.numericHintForBiometrics = hintInNumericForBiometrics;
|
||||||
|
|
||||||
this.alphaMessage = messageInAlpha;
|
|
||||||
this.alphaMessageForBiometrics = messageInAlphaForBiometrics;
|
this.alphaMessageForBiometrics = messageInAlphaForBiometrics;
|
||||||
|
|
||||||
this.numericMessage = messageInNumeric;
|
|
||||||
this.numericMessageForBiometrics = messageInNumericForBiometrics;
|
this.numericMessageForBiometrics = messageInNumericForBiometrics;
|
||||||
|
|
||||||
this.buttonText = nextButtonText;
|
this.buttonText = nextButtonText;
|
||||||
@@ -365,11 +354,9 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
public final int numericHintForBiometrics;
|
public final int numericHintForBiometrics;
|
||||||
|
|
||||||
// Password description
|
// Password description
|
||||||
public final int alphaMessage;
|
|
||||||
public final int alphaMessageForBiometrics;
|
public final int alphaMessageForBiometrics;
|
||||||
|
|
||||||
// PIN description
|
// PIN description
|
||||||
public final int numericMessage;
|
|
||||||
public final int numericMessageForBiometrics;
|
public final int numericMessageForBiometrics;
|
||||||
|
|
||||||
public final int buttonText;
|
public final int buttonText;
|
||||||
@@ -407,7 +394,7 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
|
|
||||||
case TYPE_NONE:
|
case TYPE_NONE:
|
||||||
default:
|
default:
|
||||||
return isAlpha ? alphaMessage : numericMessage;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -869,12 +856,17 @@ public class ChooseLockPassword extends SettingsActivity {
|
|||||||
setNextEnabled(canInput && length >= LockPatternUtils.MIN_LOCK_PASSWORD_SIZE);
|
setNextEnabled(canInput && length >= LockPatternUtils.MIN_LOCK_PASSWORD_SIZE);
|
||||||
mSkipOrClearButton.setVisibility(toVisibility(canInput && length > 0));
|
mSkipOrClearButton.setVisibility(toVisibility(canInput && length > 0));
|
||||||
}
|
}
|
||||||
int message = mUiStage.getMessage(mIsAlphaMode, getStageType());
|
final int stage = getStageType();
|
||||||
if (message != 0) {
|
if (getStageType() != Stage.TYPE_NONE) {
|
||||||
mMessage.setVisibility(View.VISIBLE);
|
int message = mUiStage.getMessage(mIsAlphaMode, stage);
|
||||||
mMessage.setText(message);
|
if (message != 0) {
|
||||||
|
mMessage.setVisibility(View.VISIBLE);
|
||||||
|
mMessage.setText(message);
|
||||||
|
} else {
|
||||||
|
mMessage.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mMessage.setVisibility(View.INVISIBLE);
|
mMessage.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
setNextText(mUiStage.buttonText);
|
setNextText(mUiStage.buttonText);
|
||||||
|
@@ -363,54 +363,49 @@ public class ChooseLockPattern extends SettingsActivity {
|
|||||||
|
|
||||||
Introduction(
|
Introduction(
|
||||||
R.string.lock_settings_picker_biometrics_added_security_message,
|
R.string.lock_settings_picker_biometrics_added_security_message,
|
||||||
R.string.lockpattern_choose_pattern_description,
|
|
||||||
R.string.lockpattern_recording_intro_header,
|
R.string.lockpattern_recording_intro_header,
|
||||||
LeftButtonMode.Gone, RightButtonMode.ContinueDisabled,
|
LeftButtonMode.Gone, RightButtonMode.ContinueDisabled,
|
||||||
ID_EMPTY_MESSAGE, true),
|
ID_EMPTY_MESSAGE, true),
|
||||||
HelpScreen(
|
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),
|
LeftButtonMode.Gone, RightButtonMode.Ok, ID_EMPTY_MESSAGE, false),
|
||||||
ChoiceTooShort(
|
ChoiceTooShort(
|
||||||
R.string.lock_settings_picker_biometrics_added_security_message,
|
R.string.lock_settings_picker_biometrics_added_security_message,
|
||||||
R.string.lockpattern_choose_pattern_description,
|
|
||||||
R.string.lockpattern_recording_incorrect_too_short,
|
R.string.lockpattern_recording_incorrect_too_short,
|
||||||
LeftButtonMode.Retry, RightButtonMode.ContinueDisabled,
|
LeftButtonMode.Retry, RightButtonMode.ContinueDisabled,
|
||||||
ID_EMPTY_MESSAGE, true),
|
ID_EMPTY_MESSAGE, true),
|
||||||
FirstChoiceValid(
|
FirstChoiceValid(
|
||||||
R.string.lock_settings_picker_biometrics_added_security_message,
|
R.string.lock_settings_picker_biometrics_added_security_message,
|
||||||
R.string.lockpattern_choose_pattern_description,
|
|
||||||
R.string.lockpattern_pattern_entered_header,
|
R.string.lockpattern_pattern_entered_header,
|
||||||
LeftButtonMode.Retry, RightButtonMode.Continue, ID_EMPTY_MESSAGE, false),
|
LeftButtonMode.Retry, RightButtonMode.Continue, ID_EMPTY_MESSAGE, false),
|
||||||
NeedToConfirm(
|
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,
|
LeftButtonMode.Gone, RightButtonMode.ConfirmDisabled,
|
||||||
ID_EMPTY_MESSAGE, true),
|
ID_EMPTY_MESSAGE, true),
|
||||||
ConfirmWrong(
|
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,
|
LeftButtonMode.Gone, RightButtonMode.ConfirmDisabled,
|
||||||
ID_EMPTY_MESSAGE, true),
|
ID_EMPTY_MESSAGE, true),
|
||||||
ChoiceConfirmed(
|
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);
|
LeftButtonMode.Gone, RightButtonMode.Confirm, ID_EMPTY_MESSAGE, false);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param messageForBiometrics The message displayed at the top, above header for
|
* @param messageForBiometrics The message displayed at the top, above header for
|
||||||
* fingerprint flow.
|
* fingerprint flow.
|
||||||
* @param message The message displayed at the top.
|
|
||||||
* @param headerMessage The message displayed at the top.
|
* @param headerMessage The message displayed at the top.
|
||||||
* @param leftMode The mode of the left button.
|
* @param leftMode The mode of the left button.
|
||||||
* @param rightMode The mode of the right button.
|
* @param rightMode The mode of the right button.
|
||||||
* @param footerMessage The footer message.
|
* @param footerMessage The footer message.
|
||||||
* @param patternEnabled Whether the pattern widget is enabled.
|
* @param patternEnabled Whether the pattern widget is enabled.
|
||||||
*/
|
*/
|
||||||
Stage(int messageForBiometrics, int message, int headerMessage,
|
Stage(int messageForBiometrics, int headerMessage,
|
||||||
LeftButtonMode leftMode,
|
LeftButtonMode leftMode,
|
||||||
RightButtonMode rightMode,
|
RightButtonMode rightMode,
|
||||||
int footerMessage, boolean patternEnabled) {
|
int footerMessage, boolean patternEnabled) {
|
||||||
this.headerMessage = headerMessage;
|
this.headerMessage = headerMessage;
|
||||||
this.messageForBiometrics = messageForBiometrics;
|
this.messageForBiometrics = messageForBiometrics;
|
||||||
this.message = message;
|
|
||||||
this.leftMode = leftMode;
|
this.leftMode = leftMode;
|
||||||
this.rightMode = rightMode;
|
this.rightMode = rightMode;
|
||||||
this.footerMessage = footerMessage;
|
this.footerMessage = footerMessage;
|
||||||
@@ -419,7 +414,6 @@ public class ChooseLockPattern extends SettingsActivity {
|
|||||||
|
|
||||||
final int headerMessage;
|
final int headerMessage;
|
||||||
final int messageForBiometrics;
|
final int messageForBiometrics;
|
||||||
final int message;
|
|
||||||
final LeftButtonMode leftMode;
|
final LeftButtonMode leftMode;
|
||||||
final RightButtonMode rightMode;
|
final RightButtonMode rightMode;
|
||||||
final int footerMessage;
|
final int footerMessage;
|
||||||
@@ -735,11 +729,14 @@ public class ChooseLockPattern extends SettingsActivity {
|
|||||||
}
|
}
|
||||||
final GlifLayout layout = getActivity().findViewById(R.id.setup_wizard_layout);
|
final GlifLayout layout = getActivity().findViewById(R.id.setup_wizard_layout);
|
||||||
final boolean forAnyBiometric = mForFingerprint || mForFace || mForBiometrics;
|
final boolean forAnyBiometric = mForFingerprint || mForFace || mForBiometrics;
|
||||||
int message = forAnyBiometric ? stage.messageForBiometrics : stage.message;
|
if (forAnyBiometric) {
|
||||||
if (message == ID_EMPTY_MESSAGE) {
|
if (stage.messageForBiometrics == ID_EMPTY_MESSAGE) {
|
||||||
layout.setDescriptionText("");
|
layout.setDescriptionText("");
|
||||||
|
} else {
|
||||||
|
layout.setDescriptionText(stage.messageForBiometrics);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
layout.setDescriptionText(message);
|
layout.getDescriptionTextView().setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if (stage.footerMessage == ID_EMPTY_MESSAGE) {
|
if (stage.footerMessage == ID_EMPTY_MESSAGE) {
|
||||||
mFooterText.setText("");
|
mFooterText.setText("");
|
||||||
|
@@ -142,14 +142,8 @@ public class SetupChooseLockPattern extends ChooseLockPattern {
|
|||||||
mLeftButtonIsSkip = false;
|
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);
|
final GlifLayout layout = getActivity().findViewById(R.id.setup_wizard_layout);
|
||||||
if (stage.message == ID_EMPTY_MESSAGE) {
|
layout.setDescriptionText("");
|
||||||
layout.setDescriptionText("");
|
|
||||||
} else {
|
|
||||||
layout.setDescriptionText(stage.message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user