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

Commit 0ed05b7f authored by Maurice Lam's avatar Maurice Lam Committed by Dennis Cagle
Browse files

Remove help links when device is not provisioned. DO NOT MERGE

Bug: 31246856
Change-Id: Id638de8ab1c6b815d62916a584892be84cabe1ae
(cherry picked from commit d0a95da5)
(cherry picked from commit 566da28d087bb560b9a676a48ee080e703f1afbf)
parent 121e7315
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.hardware.fingerprint.FingerprintManager;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings.Global;
import android.text.Annotation;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
@@ -69,9 +70,15 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase
        final RecyclerItemAdapter adapter = (RecyclerItemAdapter) layout.getAdapter();
        adapter.setOnItemSelectedListener(this);
        Item item = (Item) adapter.findItemById(R.id.fingerprint_introduction_message);
        String linkUrl = getString(R.string.help_url_fingerprint);
        if (Global.getInt(getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) {
            // If the device is not provisioned, help intents from HelpUtils will be null, so don't
            // show the link at all.
            linkUrl = "";
        }
        item.setTitle(LearnMoreSpan.linkify(
                getText(R.string.security_settings_fingerprint_enroll_introduction_message),
                getString(R.string.help_url_fingerprint)));
                linkUrl));
        // setupwizard library automatically sets the divider inset to
        // R.dimen.suw_items_icon_divider_inset. We adjust this back to 0 as we do not want
        // an inset within settings.