summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-03-03 11:32:50 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-03-07 09:56:16 -0800
commitc9e29de3dc4015d1252bcf86ec586a8fc60e21e7 (patch)
tree016139f96b594b464613e3baea13c82237f6969d /src/com
parentae15145f706afcb5254aa5a6a32268fee98e836f (diff)
downloadpackages_apps_Settings-c9e29de3dc4015d1252bcf86ec586a8fc60e21e7.zip
packages_apps_Settings-c9e29de3dc4015d1252bcf86ec586a8fc60e21e7.tar.gz
packages_apps_Settings-c9e29de3dc4015d1252bcf86ec586a8fc60e21e7.tar.bz2
Settings: Remove "Learn More" clickable text if not overlaid.
If the "Learn More" textview's target click intent url is not overlaid, settings will throw an NPE. Remove the text if not overlaid. Change-Id: Ib80547a90b8c97485db2529b79172f7c461649c0 TICKET: CYNGNOS-2173
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java b/src/com/android/settings/fingerprint/FingerprintEnrollIntroduction.java
index beb1a8f..5753459 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.text.TextUtils;
import android.view.View;
import com.android.internal.logging.MetricsLogger;
@@ -40,7 +41,15 @@ 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);
+ // If help url is not overlaid, remove the button.
+ if (TextUtils.isEmpty(getString(R.string.help_url_fingerprint))) {
+ learnMoreButton.setVisibility(View.GONE);
+ } else {
+ learnMoreButton.setOnClickListener(this);
+ }
+
final int passwordQuality = new ChooseLockSettingsHelper(this).utils()
.getActivePasswordQuality(UserHandle.myUserId());
mHasPassword = passwordQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED;