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

Commit 756bc29e authored by Austin Delgado's avatar Austin Delgado
Browse files

Made learn more links clickable in biometric intros

Test: Clicked on links
Change-Id: I376db30c848fafa0680277943c83ec97690ef62d
Bug: 233543002
parent b132484e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -199,6 +199,8 @@
                    android:layout_width="16dp"
                    android:layout_height="wrap_content"/>
                <TextView
                    android:id="@+id/footer_learn_more"
                    android:linksClickable="true"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    style="@style/BiometricEnrollIntroMessage"
+5 −1
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ import android.hardware.biometrics.BiometricAuthenticator;
import android.hardware.face.FaceManager;
import android.hardware.face.FaceSensorPropertiesInternal;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
@@ -120,7 +122,9 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
        infoMessageLooking.setText(getInfoMessageLooking());
        inControlTitle.setText(getInControlTitle());
        howMessage.setText(getHowMessage());
        inControlMessage.setText(getInControlMessage());
        inControlMessage.setText(Html.fromHtml(getString(getInControlMessage()),
                Html.FROM_HTML_MODE_LEGACY));
        inControlMessage.setMovementMethod(LinkMovementMethod.getInstance());
        lessSecure.setText(getLessSecureMessage());

        // Set up and show the "less secure" info section if necessary.
+12 −0
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ import android.hardware.biometrics.BiometricAuthenticator;
import android.hardware.fingerprint.FingerprintManager;
import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
@@ -104,6 +106,11 @@ public class FingerprintEnrollIntroduction extends BiometricEnrollIntroduction {
        footerMessage5.setText(getFooterMessage5());
        footerMessage6.setText(getFooterMessage6());

        final TextView footerLink = findViewById(R.id.footer_learn_more);
        footerLink.setMovementMethod(LinkMovementMethod.getInstance());
        footerLink.setText(Html.fromHtml(getString(getFooterLearnMore()),
                Html.FROM_HTML_MODE_LEGACY));

        if (mCanAssumeUdfps) {
            footerMessage6.setVisibility(View.VISIBLE);
            iconShield.setVisibility(View.VISIBLE);
@@ -187,6 +194,11 @@ public class FingerprintEnrollIntroduction extends BiometricEnrollIntroduction {
        return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_6;
    }

    @StringRes
    protected int getFooterLearnMore() {
        return R.string.security_settings_fingerprint_v2_enroll_introduction_message_learn_more;
    }

    @Override
    protected boolean isDisabledByAdmin() {
        return RestrictedLockUtilsInternal.checkIfKeyguardFeaturesDisabled(