<string name="security_settings_fingerprint_preference_summary_none"></string>
<!-- Introduction title shown in fingerprint enrollment to introduce the fingerprint feature[CHAR LIMIT=29] -->
<string name="security_settings_fingerprint_enroll_introduction_title">Unlock with fingerprint</string>
+ <!-- Introduction title shown in fingerprint enrollment to introduce the fingerprint feature, when fingerprint unlock is disabed by device admin [CHAR LIMIT=29] -->
+ <string name="security_settings_fingerprint_enroll_introduction_title_unlock_disabled">Use your fingerprint</string>
<!-- Introduction detail message shown in fingerprint enrollment dialog [CHAR LIMIT=NONE]-->
<string name="security_settings_fingerprint_enroll_introduction_message">Just touch the fingerprint sensor to unlock your phone, authorize purchases, or sign in to apps. Be careful whose fingerprints you add. Even one added print can do any of these things.\n\nNote: Your fingerprint may be less secure than a strong pattern or PIN.</string>
+ <!-- Introduction detail message shown in fingerprint enrollment dialog, when fingerprint unlock is disabled by device admin [CHAR LIMIT=NONE]-->
+ <string name="security_settings_fingerprint_enroll_introduction_message_unlock_disabled">Just touch the fingerprint sensor to authorize purchases, or sign in to apps. Be careful whose fingerprints you add. Even one added print can do any of these things.\n\nNote: You can\u2019t use your fingerprint to unlock this device. For more information, contact your organization\u2019s admin.</string>
<!-- Introduction detail message shown in fingerprint enrollment screen in setup wizard. [CHAR LIMIT=NONE]-->
<string name="security_settings_fingerprint_enroll_introduction_message_setup">Just touch the fingerprint sensor to unlock your phone, authorize purchases, or sign in to apps. Be careful whose fingerprints you add. Even one added print can do any of these things.\n\nNote: Your fingerprint may be less secure than a strong pattern or PIN.</string>
<!-- Button text to cancel enrollment from the introduction [CHAR LIMIT=22] -->
import android.util.Log;
import android.view.View;
import android.widget.Button;
+import android.widget.TextView;
import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.settings.ChooseLockGeneric;
import com.android.settings.ChooseLockSettingsHelper;
import com.android.settings.R;
import com.android.settingslib.HelpUtils;
+import com.android.settingslib.RestrictedLockUtils;
import com.android.setupwizardlib.span.LinkSpan;
/**
private UserManager mUserManager;
private boolean mHasPassword;
+ private boolean mFingerprintUnlockDisabledByAdmin;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ mFingerprintUnlockDisabledByAdmin = RestrictedLockUtils.checkIfKeyguardFeaturesDisabled(
+ this, DevicePolicyManager.KEYGUARD_DISABLE_FINGERPRINT, mUserId) != null;
+
setContentView(R.layout.fingerprint_enroll_introduction);
- setHeaderText(R.string.security_settings_fingerprint_enroll_introduction_title);
+ if (mFingerprintUnlockDisabledByAdmin) {
+ setHeaderText(R.string
+ .security_settings_fingerprint_enroll_introduction_title_unlock_disabled);
+ } else {
+ setHeaderText(R.string.security_settings_fingerprint_enroll_introduction_title);
+ }
final Button cancelButton = (Button) findViewById(R.id.fingerprint_cancel_button);
cancelButton.setOnClickListener(this);
}
@Override
+ protected void initViews() {
+ super.initViews();
+
+ TextView description = (TextView) findViewById(R.id.description_text);
+ if (mFingerprintUnlockDisabledByAdmin) {
+ description.setText(R.string
+ .security_settings_fingerprint_enroll_introduction_message_unlock_disabled);
+ }
+ }
+
+ @Override
public void onClick(LinkSpan span) {
if ("url".equals(span.getId())) {
String url = getString(R.string.help_url_fingerprint);