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

Commit c9e29de3 authored by Adnan Begovic's avatar Adnan Begovic Committed by Gerrit Code Review
Browse files

Settings: Remove "Learn More" clickable text if not overlaid.

  If the "Learn More" textview's target click intent url is
  not overlaid, settings will throw an NPE. Remove the text
  if not overlaid.

Change-Id: Ib80547a90b8c97485db2529b79172f7c461649c0
TICKET: CYNGNOS-2173
parent ae15145f
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.app.admin.DevicePolicyManager;
import android.content.Intent;
import android.os.Bundle;
import android.os.UserHandle;
import android.text.TextUtils;
import android.view.View;

import com.android.internal.logging.MetricsLogger;
@@ -40,7 +41,15 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase {
        setContentView(R.layout.fingerprint_enroll_introduction);
        setHeaderText(R.string.security_settings_fingerprint_enroll_introduction_title);
        findViewById(R.id.cancel_button).setOnClickListener(this);
        findViewById(R.id.learn_more_button).setOnClickListener(this);

        final View learnMoreButton = findViewById(R.id.learn_more_button);
        // If help url is not overlaid, remove the button.
        if (TextUtils.isEmpty(getString(R.string.help_url_fingerprint))) {
            learnMoreButton.setVisibility(View.GONE);
        } else {
            learnMoreButton.setOnClickListener(this);
        }

        final int passwordQuality = new ChooseLockSettingsHelper(this).utils()
                .getActivePasswordQuality(UserHandle.myUserId());
        mHasPassword = passwordQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED;