Merge "[Fingerprint] Don't show warning dialog if screen lock is set up"

This commit is contained in:
TreeHugger Robot
2017-01-18 19:33:21 +00:00
committed by Android (Google) Code Review
2 changed files with 121 additions and 3 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.fingerprint;
import android.app.KeyguardManager;
import android.content.Intent;
import android.content.res.Resources;
import android.os.UserHandle;
@@ -83,9 +84,17 @@ public class SetupFingerprintEnrollIntroduction extends FingerprintEnrollIntrodu
@Override
protected void onCancelButtonClick() {
SetupSkipDialog dialog = SetupSkipDialog.newInstance(
getIntent().getBooleanExtra(SetupSkipDialog.EXTRA_FRP_SUPPORTED, false));
dialog.show(getFragmentManager());
KeyguardManager keyguardManager = getSystemService(KeyguardManager.class);
if (keyguardManager.isKeyguardSecure()) {
// If the keyguard is already set up securely (maybe the user added a backup screen
// lock and skipped fingerprint), return RESULT_SKIP directly.
setResult(RESULT_SKIP);
finish();
} else {
SetupSkipDialog dialog = SetupSkipDialog.newInstance(
getIntent().getBooleanExtra(SetupSkipDialog.EXTRA_FRP_SUPPORTED, false));
dialog.show(getFragmentManager());
}
}
@Override