Merge "Do not auth in settings if UDFPS" into sc-dev am: 8eec01fc17
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14282593 Change-Id: I1189e3aff61536dd014bce38dca21c4ba9b72959
This commit is contained in:
@@ -29,6 +29,7 @@ import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.hardware.fingerprint.Fingerprint;
|
||||
import android.hardware.fingerprint.FingerprintManager;
|
||||
import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.UserHandle;
|
||||
@@ -132,6 +133,7 @@ public class FingerprintSettings extends SubSettings {
|
||||
protected static final boolean DEBUG = false;
|
||||
|
||||
private FingerprintManager mFingerprintManager;
|
||||
private List<FingerprintSensorPropertiesInternal> mSensorProperties;
|
||||
private boolean mInFingerprintLockout;
|
||||
private byte[] mToken;
|
||||
private boolean mLaunchedConfirm;
|
||||
@@ -262,6 +264,11 @@ public class FingerprintSettings extends SubSettings {
|
||||
}
|
||||
|
||||
private void retryFingerprint() {
|
||||
if (isUdfps()) {
|
||||
// Do not authenticate for UDFPS devices.
|
||||
return;
|
||||
}
|
||||
|
||||
if (mRemovalSidecar.inProgress()
|
||||
|| 0 == mFingerprintManager.getEnrolledFingerprints(mUserId).size()) {
|
||||
return;
|
||||
@@ -288,6 +295,7 @@ public class FingerprintSettings extends SubSettings {
|
||||
|
||||
Activity activity = getActivity();
|
||||
mFingerprintManager = Utils.getFingerprintManagerOrNull(activity);
|
||||
mSensorProperties = mFingerprintManager.getSensorPropertiesInternal();
|
||||
|
||||
mToken = getIntent().getByteArrayExtra(
|
||||
ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN);
|
||||
@@ -355,6 +363,15 @@ public class FingerprintSettings extends SubSettings {
|
||||
linkInfo, adminLinkInfo);
|
||||
}
|
||||
|
||||
private boolean isUdfps() {
|
||||
for (FingerprintSensorPropertiesInternal prop : mSensorProperties) {
|
||||
if (prop.isAnyUdfpsType()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void removeFingerprintPreference(int fingerprintId) {
|
||||
String name = genKey(fingerprintId);
|
||||
Preference prefToRemove = findPreference(name);
|
||||
|
Reference in New Issue
Block a user