Snap for 9127594 from 471ccfc1be to udc-release

Change-Id: Icfa0f785a7a5dfd197ca213db7884c26e16b4a8f
This commit is contained in:
Android Build Coastguard Worker
2022-10-01 03:26:32 +00:00
4 changed files with 14 additions and 12 deletions

View File

@@ -112,7 +112,9 @@ class TextReadingPreviewController extends BasePreferenceController implements
mPreviewPreference.setPreviewAdapter(pagerAdapter);
mPreviewPreference.setCurrentItem(
isLayoutRtl ? PREVIEW_SAMPLE_RES_IDS.length - 1 : FRAME_INITIAL_INDEX);
pagerAdapter.setPreviewLayer(getPagerIndex(), LAYER_INITIAL_INDEX,
final int initialPagerIndex =
mLastFontProgress * mDisplaySizeData.getValues().size() + mLastDisplayProgress;
pagerAdapter.setPreviewLayer(initialPagerIndex, LAYER_INITIAL_INDEX,
FRAME_INITIAL_INDEX, /* animate= */ false);
}
@@ -168,11 +170,13 @@ class TextReadingPreviewController extends BasePreferenceController implements
private int getPagerIndex() {
final int displayDataSize = mDisplaySizeData.getValues().size();
final int fontSizeProgress = mFontSizePreference.getProgress();
final int displaySizeProgress = mDisplaySizePreference.getProgress();
// To be consistent with the {@link PreviewPagerAdapter#setPreviewLayer(int, int, int,
// boolean)} behavior, here also needs the same design. In addition, please also refer to
// the {@link #createConfig(Configuration)}.
return mLastFontProgress * displayDataSize + mLastDisplayProgress;
return fontSizeProgress * displayDataSize + displaySizeProgress;
}
private void tryCommitFontSizeConfig() {

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: {

View File

@@ -168,8 +168,6 @@ public class FingerprintEnrollFindSensor extends BiometricEnrollBase implements
private void updateSfpsFindSensorAnimationAsset() {
mIllustrationLottie = findViewById(R.id.illustration_lottie);
LottieColorUtils.applyDynamicColors(getApplicationContext(), mIllustrationLottie);
mIllustrationLottie.setVisibility(View.VISIBLE);
final int rotation = getApplicationContext().getDisplay().getRotation();
switch (rotation) {
@@ -190,6 +188,9 @@ public class FingerprintEnrollFindSensor extends BiometricEnrollBase implements
R.raw.fingerprint_edu_lottie_landscape_top_right);
break;
}
LottieColorUtils.applyDynamicColors(getApplicationContext(), mIllustrationLottie);
mIllustrationLottie.setVisibility(View.VISIBLE);
mIllustrationLottie.playAnimation();
}

View File

@@ -18,6 +18,7 @@ package com.android.settings.network.telephony;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
@@ -104,7 +105,7 @@ public class ContactDiscoveryDialogFragment extends InstrumentedDialogFragment
@Override
public int getMetricsCategory() {
return METRICS_CATEGORY_UNKNOWN;
return SettingsEnums.SETTINGS_CONTACT_DISCOVERY;
}
@VisibleForTesting