Remove help links when device is not provisioned. DO NOT MERGE
Bug: 31246856 Change-Id: Id638de8ab1c6b815d62916a584892be84cabe1ae
This commit is contained in:
@@ -25,6 +25,7 @@ import android.hardware.fingerprint.FingerprintManager;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
|
import android.provider.Settings.Global;
|
||||||
import android.text.Annotation;
|
import android.text.Annotation;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
@@ -69,9 +70,15 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase
|
|||||||
final RecyclerItemAdapter adapter = (RecyclerItemAdapter) layout.getAdapter();
|
final RecyclerItemAdapter adapter = (RecyclerItemAdapter) layout.getAdapter();
|
||||||
adapter.setOnItemSelectedListener(this);
|
adapter.setOnItemSelectedListener(this);
|
||||||
Item item = (Item) adapter.findItemById(R.id.fingerprint_introduction_message);
|
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(
|
item.setTitle(LearnMoreSpan.linkify(
|
||||||
getText(R.string.security_settings_fingerprint_enroll_introduction_message),
|
getText(R.string.security_settings_fingerprint_enroll_introduction_message),
|
||||||
getString(R.string.help_url_fingerprint)));
|
linkUrl));
|
||||||
// setupwizard library automatically sets the divider inset to
|
// 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
|
// R.dimen.suw_items_icon_divider_inset. We adjust this back to 0 as we do not want
|
||||||
// an inset within settings.
|
// an inset within settings.
|
||||||
|
Reference in New Issue
Block a user