diff options
author | Maurice Lam <yukl@google.com> | 2016-09-02 16:34:38 -0700 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2016-09-27 15:59:17 -0700 |
commit | 094752f5a1257d77fc9454dad63f87dbe0dbc5be (patch) | |
tree | 4338be77ba3e6a897e1f376f94f5d42534bf61b6 /src | |
parent | 2169505c9a9300ca564a39d218b80dcfefc76c2a (diff) | |
download | packages_apps_Settings-094752f5a1257d77fc9454dad63f87dbe0dbc5be.zip packages_apps_Settings-094752f5a1257d77fc9454dad63f87dbe0dbc5be.tar.gz packages_apps_Settings-094752f5a1257d77fc9454dad63f87dbe0dbc5be.tar.bz2 |
[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 c94f2b93afa2db9d87f9d8e0dc0c8709f16a326d)
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java b/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java index beb1a8f..bc2757a 100644 --- a/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java +++ b/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java @@ -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,7 +96,9 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase { private void launchFingerprintHelp() { Intent helpIntent = HelpUtils.getHelpIntent(this, getString(R.string.help_url_fingerprint), getClass().getName()); - startActivity(helpIntent); + if (helpIntent != null) { + startActivity(helpIntent); + } } @Override |