Merge "Removed subtext from side fps enrollment flow" into tm-qpr-dev am: 97f99f5d30
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21613842 Change-Id: Ia2a62797dd783366a5d2df4494a25d748fac7995 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.biometrics.fingerprint;
|
||||
|
||||
import static android.hardware.biometrics.BiometricFingerprintConstants.FINGERPRINT_ERROR_USER_CANCELED;
|
||||
import static android.text.Layout.HYPHENATION_FREQUENCY_NONE;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.ObjectAnimator;
|
||||
@@ -278,7 +279,6 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
setDescriptionText(R.string.security_settings_udfps_enroll_start_message);
|
||||
} else if (mCanAssumeSfps) {
|
||||
setContentView(R.layout.sfps_enroll_enrolling);
|
||||
setDescriptionText(R.string.security_settings_fingerprint_enroll_start_message);
|
||||
setHelpAnimation();
|
||||
} else {
|
||||
setContentView(R.layout.fingerprint_enroll_enrolling);
|
||||
@@ -544,7 +544,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
mIllustrationLottie.setContentDescription(
|
||||
getString(R.string.security_settings_udfps_tip_fingerprint_help)
|
||||
);
|
||||
configureEnrollmentStage("", R.raw.udfps_tip_hint_lottie);
|
||||
configureEnrollmentStage(R.raw.udfps_tip_hint_lottie);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -555,7 +555,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
mIllustrationLottie.setContentDescription(
|
||||
getString(R.string.security_settings_udfps_side_fingerprint_help)
|
||||
);
|
||||
configureEnrollmentStage("", R.raw.udfps_left_edge_hint_lottie);
|
||||
configureEnrollmentStage(R.raw.udfps_left_edge_hint_lottie);
|
||||
} else if (mIllustrationLottie == null) {
|
||||
if (isStageHalfCompleted()) {
|
||||
setDescriptionText(
|
||||
@@ -572,7 +572,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
mIllustrationLottie.setContentDescription(
|
||||
getString(R.string.security_settings_udfps_side_fingerprint_help)
|
||||
);
|
||||
configureEnrollmentStage("", R.raw.udfps_right_edge_hint_lottie);
|
||||
configureEnrollmentStage(R.raw.udfps_right_edge_hint_lottie);
|
||||
|
||||
} else if (mIllustrationLottie == null) {
|
||||
if (isStageHalfCompleted()) {
|
||||
@@ -624,10 +624,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
0
|
||||
)
|
||||
);
|
||||
configureEnrollmentStage(
|
||||
getString(R.string.security_settings_sfps_enroll_start_message),
|
||||
R.raw.sfps_lottie_no_animation
|
||||
);
|
||||
configureEnrollmentStage(R.raw.sfps_lottie_no_animation);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -635,10 +632,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
setHeaderText(R.string.security_settings_sfps_enroll_finger_center_title);
|
||||
if (!mHaveShownSfpsCenterLottie && mIllustrationLottie != null) {
|
||||
mHaveShownSfpsCenterLottie = true;
|
||||
configureEnrollmentStage(
|
||||
getString(R.string.security_settings_sfps_enroll_start_message),
|
||||
R.raw.sfps_lottie_pad_center
|
||||
);
|
||||
configureEnrollmentStage(R.raw.sfps_lottie_pad_center);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -646,7 +640,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
setHeaderText(R.string.security_settings_sfps_enroll_fingertip_title);
|
||||
if (!mHaveShownSfpsTipLottie && mIllustrationLottie != null) {
|
||||
mHaveShownSfpsTipLottie = true;
|
||||
configureEnrollmentStage("", R.raw.sfps_lottie_tip);
|
||||
configureEnrollmentStage(R.raw.sfps_lottie_tip);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -654,7 +648,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
setHeaderText(R.string.security_settings_sfps_enroll_left_edge_title);
|
||||
if (!mHaveShownSfpsLeftEdgeLottie && mIllustrationLottie != null) {
|
||||
mHaveShownSfpsLeftEdgeLottie = true;
|
||||
configureEnrollmentStage("", R.raw.sfps_lottie_left_edge);
|
||||
configureEnrollmentStage(R.raw.sfps_lottie_left_edge);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -662,7 +656,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
setHeaderText(R.string.security_settings_sfps_enroll_right_edge_title);
|
||||
if (!mHaveShownSfpsRightEdgeLottie && mIllustrationLottie != null) {
|
||||
mHaveShownSfpsRightEdgeLottie = true;
|
||||
configureEnrollmentStage("", R.raw.sfps_lottie_right_edge);
|
||||
configureEnrollmentStage(R.raw.sfps_lottie_right_edge);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -673,7 +667,6 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
// announce a different string for a11y upon entering the page.
|
||||
getLayout().setHeaderText(
|
||||
R.string.security_settings_sfps_enroll_find_sensor_title);
|
||||
setDescriptionText(R.string.security_settings_sfps_enroll_start_message);
|
||||
final CharSequence description = getString(
|
||||
R.string.security_settings_sfps_enroll_find_sensor_message);
|
||||
getLayout().getHeaderTextView().setContentDescription(description);
|
||||
@@ -683,8 +676,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
}
|
||||
}
|
||||
|
||||
private void configureEnrollmentStage(CharSequence description, @RawRes int lottie) {
|
||||
setDescriptionText(description);
|
||||
private void configureEnrollmentStage(@RawRes int lottie) {
|
||||
LottieCompositionFactory.fromRawRes(this, lottie)
|
||||
.addListener((c) -> {
|
||||
mIllustrationLottie.setComposition(c);
|
||||
@@ -858,16 +850,16 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
}
|
||||
|
||||
private void showError(CharSequence error) {
|
||||
if (mCanAssumeUdfps || mCanAssumeSfps) {
|
||||
if (mCanAssumeSfps) {
|
||||
setHeaderText(error);
|
||||
if (!mHelpAnimation.isRunning()) {
|
||||
mHelpAnimation.start();
|
||||
}
|
||||
applySfpsErrorDynamicColors(getApplicationContext(), true);
|
||||
} else if (mCanAssumeUdfps) {
|
||||
setHeaderText(error);
|
||||
// Show nothing for subtitle when getting an error message.
|
||||
setDescriptionText("");
|
||||
if (mCanAssumeSfps) {
|
||||
if (!mHelpAnimation.isRunning()) {
|
||||
mHelpAnimation.start();
|
||||
}
|
||||
applySfpsErrorDynamicColors(getApplicationContext(), true);
|
||||
}
|
||||
} else {
|
||||
mErrorText.setText(error);
|
||||
if (mErrorText.getVisibility() == View.INVISIBLE) {
|
||||
@@ -1091,17 +1083,16 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
|
||||
final boolean isLandscape = newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE;
|
||||
|
||||
if (mCanAssumeSfps) {
|
||||
// hide the description
|
||||
descriptionMixin.getTextView().setVisibility(View.GONE);
|
||||
headerMixin.getTextView().setHyphenationFrequency(HYPHENATION_FREQUENCY_NONE);
|
||||
if (isLandscape) {
|
||||
headerMixin.setAutoTextSizeEnabled(true);
|
||||
headerMixin.getTextView().setMinLines(0);
|
||||
headerMixin.getTextView().setMaxLines(10);
|
||||
descriptionMixin.getTextView().setMinLines(0);
|
||||
descriptionMixin.getTextView().setMaxLines(10);
|
||||
} else {
|
||||
headerMixin.setAutoTextSizeEnabled(false);
|
||||
headerMixin.getTextView().setLines(4);
|
||||
// hide the description
|
||||
descriptionMixin.getTextView().setLines(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user