fixup! Hide SFPS wakeup setting when it's not supported
Change-Id: I61b3fefbb1792322aeed3594f4e8a3558df4e13f
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java b/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java
index c3062ab..700f635 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintSettings.java
@@ -181,7 +181,7 @@
mRequireScreenOnToAuthPreferenceController;
private RestrictedSwitchPreference mRequireScreenOnToAuthPreference;
private PreferenceCategory mFingerprintUnlockCategory;
- private boolean mRequireScreenOnToAuth;
+ private boolean mFingerprintWakeAndUnlock;
private FingerprintManager mFingerprintManager;
private FingerprintUpdater mFingerprintUpdater;
@@ -248,7 +248,7 @@
}
private void updateDialog() {
- if (isSfps() && !mRequireScreenOnToAuth) {
+ if (isSfps() && mFingerprintWakeAndUnlock) {
setRequireScreenOnToAuthVisibility();
}
RenameDialog renameDialog = (RenameDialog) getFragmentManager().
@@ -353,8 +353,8 @@
mFingerprintManager = Utils.getFingerprintManagerOrNull(activity);
mFingerprintUpdater = new FingerprintUpdater(activity, mFingerprintManager);
mSensorProperties = mFingerprintManager.getSensorPropertiesInternal();
- mRequireScreenOnToAuth = getContext().getResources().getBoolean(
- com.android.internal.R.bool.config_performantAuthDefault);
+ mFingerprintWakeAndUnlock = getContext().getResources().getBoolean(
+ org.lineageos.platform.internal.R.bool.config_fingerprintWakeAndUnlock);
mToken = getIntent().getByteArrayExtra(
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN);
@@ -524,7 +524,7 @@
return true;
});
mFingerprintUnlockCategory.setVisible(false);
- if (isSfps() && !mRequireScreenOnToAuth) {
+ if (isSfps() && mFingerprintWakeAndUnlock) {
setRequireScreenOnToAuthVisibility();
}
setPreferenceScreen(root);
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintSettingsRequireScreenOnToAuthPreferenceController.java b/src/com/android/settings/biometrics/fingerprint/FingerprintSettingsRequireScreenOnToAuthPreferenceController.java
index 52e6d13..01e6b82 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintSettingsRequireScreenOnToAuthPreferenceController.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintSettingsRequireScreenOnToAuthPreferenceController.java
@@ -58,7 +58,7 @@
getUserHandle());
if (toReturn == -1) {
toReturn = mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_performantAuthDefault) ? 1 : 0;
+ org.lineageos.platform.internal.R.bool.config_fingerprintWakeAndUnlock) ? 1 : 0;
Settings.Secure.putIntForUser(mContext.getContentResolver(),
Settings.Secure.SFPS_PERFORMANT_AUTH_ENABLED, toReturn, getUserHandle());
}