packages/apps/Settings
Revisão | e4e22653f54d9ed9522d6340e2059ff12d859cb0 (tree) |
---|---|
Hora | 2017-01-10 23:16:01 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Merge tag 'android-6.0.1_r74' into marshmallow-x86
Android 6.0.1 release 74
@@ -20,6 +20,7 @@ import android.app.admin.DevicePolicyManager; | ||
20 | 20 | import android.content.Intent; |
21 | 21 | import android.os.Bundle; |
22 | 22 | import android.os.UserHandle; |
23 | +import android.provider.Settings.Global; | |
23 | 24 | import android.view.View; |
24 | 25 | |
25 | 26 | import com.android.internal.logging.MetricsLogger; |
@@ -40,7 +41,11 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase { | ||
40 | 41 | setContentView(R.layout.fingerprint_enroll_introduction); |
41 | 42 | setHeaderText(R.string.security_settings_fingerprint_enroll_introduction_title); |
42 | 43 | findViewById(R.id.cancel_button).setOnClickListener(this); |
43 | - findViewById(R.id.learn_more_button).setOnClickListener(this); | |
44 | + final View learnMoreButton = findViewById(R.id.learn_more_button); | |
45 | + learnMoreButton.setOnClickListener(this); | |
46 | + if (Global.getInt(getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) { | |
47 | + learnMoreButton.setVisibility(View.GONE); | |
48 | + } | |
44 | 49 | final int passwordQuality = new ChooseLockSettingsHelper(this).utils() |
45 | 50 | .getActivePasswordQuality(UserHandle.myUserId()); |
46 | 51 | mHasPassword = passwordQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED; |
@@ -91,7 +96,9 @@ public class FingerprintEnrollIntroduction extends FingerprintEnrollBase { | ||
91 | 96 | private void launchFingerprintHelp() { |
92 | 97 | Intent helpIntent = HelpUtils.getHelpIntent(this, |
93 | 98 | getString(R.string.help_url_fingerprint), getClass().getName()); |
94 | - startActivity(helpIntent); | |
99 | + if (helpIntent != null) { | |
100 | + startActivity(helpIntent); | |
101 | + } | |
95 | 102 | } |
96 | 103 | |
97 | 104 | @Override |