Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3313f96 authored by Jason Chang's avatar Jason Chang
Browse files

Fix Biometric Face & Fingerprint Introduction's Primary "More" button

text truncated

Re-create new instance of FooterButton for primary "More" button.

Flag: EXEMPT bug-fixing

Bug: 331638166

Test: build ABTD ROM then change different language to check Primary
"More" button text

Change-Id: Iddd16a819aca73f0852ec32f552f101208d326a8
parent 4bb068a9
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -236,6 +236,7 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
        requireScrollMixin.requireScrollWithButton(this, getPrimaryFooterButton(),
                getMoreButtonTextRes(), this::onNextButtonClick);
        if (!isExpressiveStyle) {
            final int theme = com.google.android.setupdesign.R.style.SudGlifButton_Primary;
            requireScrollMixin.setOnRequireScrollStateChangedListener(
                    scrollNeeded -> {
                        boolean enrollmentCompleted = checkMaxEnrolled() != 0;
@@ -244,7 +245,13 @@ public abstract class BiometricEnrollIntroduction extends BiometricEnrollBase
                            final int primaryButtonTextRes = scrollNeeded
                                    ? getMoreButtonTextRes()
                                    : getAgreeButtonTextRes();
                            getPrimaryFooterButton().setText(this, primaryButtonTextRes);
                            final FooterButton primaryButton = new FooterButton.Builder(this)
                                    .setText(primaryButtonTextRes)
                                    .setButtonType(FooterButton.ButtonType.OPT_IN)
                                    .setListener(this::onNextButtonClick)
                                    .setTheme(theme)
                                    .build();
                            mFooterBarMixin.setPrimaryButton(primaryButton);
                        }

                        // Show secondary button once scroll is completed.