Merge "Show lottie on non-default display density on SFPS" into tm-qpr-dev am: c6d9164dd4

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20083885

Change-Id: Iea3e8fd7e16fdd4af2b9a2bde3ea5991e3fabffb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Grace Cheng
2022-09-30 17:34:25 +00:00
committed by Automerger Merge Worker

View File

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