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

Commit 94a0fa57 authored by Maurice Lam's avatar Maurice Lam Committed by android-build-merger
Browse files

[Fingerprint] Remove learn more link if not provisioned. DO NOT MERGE am: c94f2b93

am: d278da79

Change-Id: I771b15c4c94314f7fb3f1d3d3734b0c97a35f782
parents 68d53c04 d278da79
Loading
Loading
Loading
Loading
+9 −2
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.provider.Settings.Global;
import android.view.View;

import com.android.internal.logging.MetricsLogger;
@@ -40,7 +41,11 @@ 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);
        learnMoreButton.setOnClickListener(this);
        if (Global.getInt(getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) {
            learnMoreButton.setVisibility(View.GONE);
        }
        final int passwordQuality = new ChooseLockSettingsHelper(this).utils()
                .getActivePasswordQuality(UserHandle.myUserId());
        mHasPassword = passwordQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED;
@@ -91,8 +96,10 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase {
    private void launchFingerprintHelp() {
        Intent helpIntent = HelpUtils.getHelpIntent(this,
                getString(R.string.help_url_fingerprint), getClass().getName());
        if (helpIntent != null) {
            startActivity(helpIntent);
        }
    }

    @Override
    protected int getMetricsCategory() {