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

Commit 094752f5 authored by Maurice Lam's avatar Maurice Lam Committed by gitbuildkicker
Browse files

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

Remove the learn more link during setup wizard, because HelpUtils is
returning null for the intent while the device is not provisioned.

Bug: 31246856
Change-Id: I4cf5c282f170188aef98a02d3b96af5e63ea7f39
(cherry picked from commit c94f2b93)
parent 2169505c
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() {