Update new consent screen for fingerprint

- Move top description into subtitle for landscape mode
- Update the button text

Bug: 177591560
Test: robotest and visual verified
1) Settings -> Security -> Fingerprint
2) Rotate the device and check if the description is on the right side

Change-Id: Ie20597fce48f73aa83c5d637682db1860c384a7a
This commit is contained in:
Mill Chen
2021-03-05 03:30:11 +08:00
parent 61aa289dac
commit c2be31a7d3
6 changed files with 145 additions and 26 deletions

View File

@@ -173,6 +173,10 @@ public abstract class BiometricEnrollBase extends InstrumentedActivity {
setHeaderText(resId, false /* force */);
}
protected void setDescriptionText(int resId) {
getLayout().setDescriptionText(resId);
}
protected FooterButton getNextButton() {
if (mFooterBarMixin != null) {
return mFooterBarMixin.getPrimaryButton();

View File

@@ -309,9 +309,8 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
protected void initViews() {
super.initViews();
TextView description = (TextView) findViewById(R.id.sud_layout_description);
if (mBiometricUnlockDisabledByAdmin) {
description.setText(getDescriptionResDisabledByAdmin());
setDescriptionText(getDescriptionResDisabledByAdmin());
}
}
}

View File

@@ -57,6 +57,8 @@ public class FingerprintEnrollIntroduction extends BiometricEnrollIntroduction {
super.onCreate(savedInstanceState);
setDescriptionText(R.string.security_settings_fingerprint_enroll_introduction_message);
mFooterBarMixin = getLayout().getMixin(FooterBarMixin.class);
mFooterBarMixin.setSecondaryButton(
new FooterButton.Builder(this)
@@ -69,7 +71,7 @@ public class FingerprintEnrollIntroduction extends BiometricEnrollIntroduction {
mFooterBarMixin.setPrimaryButton(
new FooterButton.Builder(this)
.setText(R.string.wizard_next)
.setText(R.string.security_settings_fingerprint_enroll_introduction_agree)
.setListener(this::onNextButtonClick)
.setButtonType(FooterButton.ButtonType.NEXT)
.setTheme(R.style.SudGlifButton_Primary)
@@ -78,7 +80,7 @@ public class FingerprintEnrollIntroduction extends BiometricEnrollIntroduction {
}
int getNegativeButtonTextId() {
return R.string.security_settings_fingerprint_enroll_introduction_no_thanks;
return R.string.security_settings_fingerprint_enroll_introduction_skip;
}
@Override