Merge "[Fingerprint] Don't show warning dialog if screen lock is set up"
This commit is contained in:
committed by
Android (Google) Code Review
commit
54175aaaba
@@ -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
|
||||
|
Reference in New Issue
Block a user