Show lottie on non-default display density on SFPS

Continue showing lottie when text size/display size is changed on SFPS, because unlike C10/P10, lottie will not overlap text on SFPS

Test: (manual) Change display size and text size to max, verify lottie is visible and does not overlap text
Fixes: 245029066
Change-Id: I041415abc21722052a9adbdc927847c42cd7619f
This commit is contained in:
Grace Cheng
2022-09-29 19:37:00 +00:00
parent ee21072a5e
commit 6c72ef89b2

View File

@@ -286,8 +286,8 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
}
mShouldShowLottie = shouldShowLottie();
// Only show the lottie if the current display density is the default density.
// Otherwise, the lottie will overlap with the settings header text.
// On non-SFPS devices, only show the lottie if the current display density is the default
// density. Otherwise, the lottie will overlap with the settings header text.
boolean isLandscape = BiometricUtils.isReverseLandscape(getApplicationContext())
|| BiometricUtils.isLandscape(getApplicationContext());
@@ -771,8 +771,6 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
CharSequence announcement = getString(
R.string.security_settings_sfps_enroll_progress_a11y_message, percent);
announceEnrollmentProgress(announcement);
// mIllustrationLottie is only shown when current display density = default density,
// to prevent overlap with the settings header text.
if (mIllustrationLottie != null) {
mIllustrationLottie.setContentDescription(
getString(
@@ -1019,9 +1017,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling {
private void updateOrientation(int orientation) {
if (mCanAssumeSfps) {
if (mShouldShowLottie) {
mIllustrationLottie = findViewById(R.id.illustration_lottie);
}
mIllustrationLottie = findViewById(R.id.illustration_lottie);
} else {
switch(orientation) {
case Configuration.ORIENTATION_LANDSCAPE: {