Merge changes I5d467e8e,I5795f5ad into sc-dev
* changes: Trigger udfps-start haptic on the first fingerDown Remove test haptics for UX
This commit is contained in:
committed by
Android (Google) Code Review
commit
e684a19bbb
@@ -285,7 +285,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
protected boolean mTelephonyCapable;
|
protected boolean mTelephonyCapable;
|
||||||
|
|
||||||
private final boolean mAcquiredHapticEnabled;
|
private final boolean mAcquiredHapticEnabled = false;
|
||||||
@Nullable private final Vibrator mVibrator;
|
@Nullable private final Vibrator mVibrator;
|
||||||
|
|
||||||
// Device provisioning state
|
// Device provisioning state
|
||||||
@@ -1413,11 +1413,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public void playAcquiredHaptic() {
|
public void playAcquiredHaptic() {
|
||||||
if (mAcquiredHapticEnabled && mVibrator != null) {
|
if (mAcquiredHapticEnabled && mVibrator != null) {
|
||||||
String effect = Settings.Global.getString(
|
mVibrator.vibrate(UdfpsController.EFFECT_CLICK,
|
||||||
mContext.getContentResolver(),
|
|
||||||
"udfps_acquired_type");
|
|
||||||
mVibrator.vibrate(UdfpsController.getVibration(effect,
|
|
||||||
UdfpsController.EFFECT_TICK),
|
|
||||||
UdfpsController.VIBRATION_SONIFICATION_ATTRIBUTES);
|
UdfpsController.VIBRATION_SONIFICATION_ATTRIBUTES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1730,8 +1726,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
mLockPatternUtils = lockPatternUtils;
|
mLockPatternUtils = lockPatternUtils;
|
||||||
mAuthController = authController;
|
mAuthController = authController;
|
||||||
dumpManager.registerDumpable(getClass().getName(), this);
|
dumpManager.registerDumpable(getClass().getName(), this);
|
||||||
mAcquiredHapticEnabled = Settings.Global.getInt(mContext.getContentResolver(),
|
|
||||||
"udfps_acquired", 0) == 1;
|
|
||||||
mVibrator = vibrator;
|
mVibrator = vibrator;
|
||||||
|
|
||||||
mHandler = new Handler(mainLooper) {
|
mHandler = new Handler(mainLooper) {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
package com.android.systemui.biometrics;
|
package com.android.systemui.biometrics;
|
||||||
|
|
||||||
import static android.hardware.fingerprint.IUdfpsOverlayController.REASON_AUTH_FPM_KEYGUARD;
|
import static android.hardware.fingerprint.IUdfpsOverlayController.REASON_AUTH_FPM_KEYGUARD;
|
||||||
import static android.os.VibrationEffect.Composition.PRIMITIVE_LOW_TICK;
|
|
||||||
|
|
||||||
import static com.android.internal.util.Preconditions.checkArgument;
|
import static com.android.internal.util.Preconditions.checkArgument;
|
||||||
import static com.android.internal.util.Preconditions.checkNotNull;
|
import static com.android.internal.util.Preconditions.checkNotNull;
|
||||||
@@ -27,7 +26,6 @@ import android.annotation.NonNull;
|
|||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.ContentResolver;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
@@ -47,8 +45,6 @@ import android.os.SystemClock;
|
|||||||
import android.os.Trace;
|
import android.os.Trace;
|
||||||
import android.os.VibrationEffect;
|
import android.os.VibrationEffect;
|
||||||
import android.os.Vibrator;
|
import android.os.Vibrator;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@@ -160,16 +156,8 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
.setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
|
.setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
public static final VibrationEffect EFFECT_TICK =
|
public static final VibrationEffect EFFECT_CLICK =
|
||||||
VibrationEffect.get(VibrationEffect.EFFECT_TICK);
|
VibrationEffect.get(VibrationEffect.EFFECT_CLICK);
|
||||||
private static final VibrationEffect EFFECT_TEXTURE_TICK =
|
|
||||||
VibrationEffect.get(VibrationEffect.EFFECT_TEXTURE_TICK);
|
|
||||||
@VisibleForTesting
|
|
||||||
static final VibrationEffect EFFECT_CLICK = VibrationEffect.get(VibrationEffect.EFFECT_CLICK);
|
|
||||||
private static final VibrationEffect EFFECT_HEAVY =
|
|
||||||
VibrationEffect.get(VibrationEffect.EFFECT_HEAVY_CLICK);
|
|
||||||
private static final VibrationEffect EFFECT_DOUBLE_CLICK =
|
|
||||||
VibrationEffect.get(VibrationEffect.EFFECT_DOUBLE_CLICK);
|
|
||||||
|
|
||||||
private final ScreenLifecycle.Observer mScreenObserver = new ScreenLifecycle.Observer() {
|
private final ScreenLifecycle.Observer mScreenObserver = new ScreenLifecycle.Observer() {
|
||||||
@Override
|
@Override
|
||||||
@@ -437,7 +425,6 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
mTouchLogTime = SystemClock.elapsedRealtime();
|
mTouchLogTime = SystemClock.elapsedRealtime();
|
||||||
mPowerManager.userActivity(SystemClock.uptimeMillis(),
|
mPowerManager.userActivity(SystemClock.uptimeMillis(),
|
||||||
PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0);
|
PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0);
|
||||||
playStartHaptic();
|
|
||||||
handled = true;
|
handled = true;
|
||||||
} else if (sinceLastLog >= MIN_TOUCH_LOG_INTERVAL) {
|
} else if (sinceLastLog >= MIN_TOUCH_LOG_INTERVAL) {
|
||||||
Log.v(TAG, "onTouch | finger move: " + touchInfo);
|
Log.v(TAG, "onTouch | finger move: " + touchInfo);
|
||||||
@@ -552,18 +539,7 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public void playStartHaptic() {
|
public void playStartHaptic() {
|
||||||
if (mVibrator != null) {
|
if (mVibrator != null) {
|
||||||
final ContentResolver contentResolver =
|
mVibrator.vibrate(EFFECT_CLICK, VIBRATION_SONIFICATION_ATTRIBUTES);
|
||||||
mContext.getContentResolver();
|
|
||||||
// TODO: these settings checks should eventually be removed after ux testing
|
|
||||||
// (b/185124905)
|
|
||||||
int startEnabled = Settings.Global.getInt(contentResolver,
|
|
||||||
"udfps_start", 1);
|
|
||||||
if (startEnabled > 0) {
|
|
||||||
String startEffectSetting = Settings.Global.getString(
|
|
||||||
contentResolver, "udfps_start_type");
|
|
||||||
mVibrator.vibrate(getVibration(startEffectSetting,
|
|
||||||
EFFECT_CLICK), VIBRATION_SONIFICATION_ATTRIBUTES);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -854,6 +830,9 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
Log.w(TAG, "Null view in onFingerDown");
|
Log.w(TAG, "Null view in onFingerDown");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!mOnFingerDown) {
|
||||||
|
playStartHaptic();
|
||||||
|
}
|
||||||
mOnFingerDown = true;
|
mOnFingerDown = true;
|
||||||
mFingerprintManager.onPointerDown(mSensorProps.sensorId, x, y, minor, major);
|
mFingerprintManager.onPointerDown(mSensorProps.sensorId, x, y, minor, major);
|
||||||
Trace.endAsyncSection("UdfpsController.e2e.onPointerDown", 0);
|
Trace.endAsyncSection("UdfpsController.e2e.onPointerDown", 0);
|
||||||
@@ -881,38 +860,6 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* get vibration to play given string
|
|
||||||
* used for testing purposes (b/185124905)
|
|
||||||
*/
|
|
||||||
public static VibrationEffect getVibration(String effect, VibrationEffect defaultEffect) {
|
|
||||||
if (TextUtils.isEmpty(effect)) {
|
|
||||||
return defaultEffect;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (effect.toLowerCase()) {
|
|
||||||
case "click":
|
|
||||||
return EFFECT_CLICK;
|
|
||||||
case "heavy":
|
|
||||||
return EFFECT_HEAVY;
|
|
||||||
case "texture_tick":
|
|
||||||
return EFFECT_TEXTURE_TICK;
|
|
||||||
case "tick":
|
|
||||||
return EFFECT_TICK;
|
|
||||||
case "double_tap":
|
|
||||||
return EFFECT_DOUBLE_CLICK;
|
|
||||||
default:
|
|
||||||
try {
|
|
||||||
int primitive = Integer.parseInt(effect);
|
|
||||||
if (primitive <= PRIMITIVE_LOW_TICK && primitive > -1) {
|
|
||||||
return VibrationEffect.startComposition().addPrimitive(primitive).compose();
|
|
||||||
}
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
}
|
|
||||||
return defaultEffect;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateTouchListener() {
|
private void updateTouchListener() {
|
||||||
if (mView == null) {
|
if (mView == null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -188,18 +188,7 @@ public abstract class AcquisitionClient<T> extends HalClientMonitor<T> implement
|
|||||||
mPowerManager.userActivity(now, PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0);
|
mPowerManager.userActivity(now, PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean successHapticsEnabled() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean errorHapticsEnabled() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected final void vibrateSuccess() {
|
protected final void vibrateSuccess() {
|
||||||
if (!successHapticsEnabled()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Vibrator vibrator = getContext().getSystemService(Vibrator.class);
|
Vibrator vibrator = getContext().getSystemService(Vibrator.class);
|
||||||
if (vibrator != null) {
|
if (vibrator != null) {
|
||||||
vibrator.vibrate(SUCCESS_VIBRATION_EFFECT, VIBRATION_SONIFICATION_ATTRIBUTES);
|
vibrator.vibrate(SUCCESS_VIBRATION_EFFECT, VIBRATION_SONIFICATION_ATTRIBUTES);
|
||||||
@@ -207,9 +196,6 @@ public abstract class AcquisitionClient<T> extends HalClientMonitor<T> implement
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected final void vibrateError() {
|
protected final void vibrateError() {
|
||||||
if (!errorHapticsEnabled()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Vibrator vibrator = getContext().getSystemService(Vibrator.class);
|
Vibrator vibrator = getContext().getSystemService(Vibrator.class);
|
||||||
if (vibrator != null) {
|
if (vibrator != null) {
|
||||||
vibrator.vibrate(ERROR_VIBRATION_EFFECT, VIBRATION_SONIFICATION_ATTRIBUTES);
|
vibrator.vibrate(ERROR_VIBRATION_EFFECT, VIBRATION_SONIFICATION_ATTRIBUTES);
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ package com.android.server.biometrics.sensors.face.aidl;
|
|||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.content.ContentResolver;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.hardware.biometrics.BiometricAuthenticator;
|
import android.hardware.biometrics.BiometricAuthenticator;
|
||||||
@@ -33,7 +32,6 @@ import android.hardware.face.FaceAuthenticationFrame;
|
|||||||
import android.hardware.face.FaceManager;
|
import android.hardware.face.FaceManager;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
|
|
||||||
import com.android.internal.R;
|
import com.android.internal.R;
|
||||||
@@ -59,9 +57,6 @@ class FaceAuthenticationClient extends AuthenticationClient<ISession> implements
|
|||||||
@Nullable private final NotificationManager mNotificationManager;
|
@Nullable private final NotificationManager mNotificationManager;
|
||||||
@Nullable private ICancellationSignal mCancellationSignal;
|
@Nullable private ICancellationSignal mCancellationSignal;
|
||||||
|
|
||||||
@NonNull private final ContentResolver mContentResolver;
|
|
||||||
private final boolean mCustomHaptics;
|
|
||||||
|
|
||||||
private final int[] mBiometricPromptIgnoreList;
|
private final int[] mBiometricPromptIgnoreList;
|
||||||
private final int[] mBiometricPromptIgnoreListVendor;
|
private final int[] mBiometricPromptIgnoreListVendor;
|
||||||
private final int[] mKeyguardIgnoreList;
|
private final int[] mKeyguardIgnoreList;
|
||||||
@@ -92,10 +87,6 @@ class FaceAuthenticationClient extends AuthenticationClient<ISession> implements
|
|||||||
R.array.config_face_acquire_keyguard_ignorelist);
|
R.array.config_face_acquire_keyguard_ignorelist);
|
||||||
mKeyguardIgnoreListVendor = resources.getIntArray(
|
mKeyguardIgnoreListVendor = resources.getIntArray(
|
||||||
R.array.config_face_acquire_vendor_keyguard_ignorelist);
|
R.array.config_face_acquire_vendor_keyguard_ignorelist);
|
||||||
|
|
||||||
mContentResolver = context.getContentResolver();
|
|
||||||
mCustomHaptics = Settings.Global.getInt(mContentResolver,
|
|
||||||
"face_custom_success_error", 0) == 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -261,18 +252,4 @@ class FaceAuthenticationClient extends AuthenticationClient<ISession> implements
|
|||||||
Slog.e(TAG, "Remote exception", e);
|
Slog.e(TAG, "Remote exception", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean successHapticsEnabled() {
|
|
||||||
return mCustomHaptics
|
|
||||||
? Settings.Global.getInt(mContentResolver, "face_success_enabled", 1) == 0
|
|
||||||
: super.successHapticsEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean errorHapticsEnabled() {
|
|
||||||
return mCustomHaptics
|
|
||||||
? Settings.Global.getInt(mContentResolver, "face_error_enabled", 1) == 0
|
|
||||||
: super.errorHapticsEnabled();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
package com.android.server.biometrics.sensors.face.hidl;
|
package com.android.server.biometrics.sensors.face.hidl;
|
||||||
|
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.content.ContentResolver;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.hardware.biometrics.BiometricAuthenticator;
|
import android.hardware.biometrics.BiometricAuthenticator;
|
||||||
@@ -28,7 +27,6 @@ import android.hardware.biometrics.face.V1_0.IBiometricsFace;
|
|||||||
import android.hardware.face.FaceManager;
|
import android.hardware.face.FaceManager;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
|
|
||||||
import com.android.internal.R;
|
import com.android.internal.R;
|
||||||
@@ -49,8 +47,6 @@ class FaceAuthenticationClient extends AuthenticationClient<IBiometricsFace> {
|
|||||||
|
|
||||||
private static final String TAG = "FaceAuthenticationClient";
|
private static final String TAG = "FaceAuthenticationClient";
|
||||||
|
|
||||||
@NonNull private final ContentResolver mContentResolver;
|
|
||||||
private final boolean mCustomHaptics;
|
|
||||||
private final UsageStats mUsageStats;
|
private final UsageStats mUsageStats;
|
||||||
|
|
||||||
private final int[] mBiometricPromptIgnoreList;
|
private final int[] mBiometricPromptIgnoreList;
|
||||||
@@ -81,10 +77,6 @@ class FaceAuthenticationClient extends AuthenticationClient<IBiometricsFace> {
|
|||||||
R.array.config_face_acquire_keyguard_ignorelist);
|
R.array.config_face_acquire_keyguard_ignorelist);
|
||||||
mKeyguardIgnoreListVendor = resources.getIntArray(
|
mKeyguardIgnoreListVendor = resources.getIntArray(
|
||||||
R.array.config_face_acquire_vendor_keyguard_ignorelist);
|
R.array.config_face_acquire_vendor_keyguard_ignorelist);
|
||||||
|
|
||||||
mContentResolver = context.getContentResolver();
|
|
||||||
mCustomHaptics = Settings.Global.getInt(mContentResolver,
|
|
||||||
"face_custom_success_error", 0) == 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -200,18 +192,4 @@ class FaceAuthenticationClient extends AuthenticationClient<IBiometricsFace> {
|
|||||||
final boolean shouldSend = shouldSend(acquireInfo, vendorCode);
|
final boolean shouldSend = shouldSend(acquireInfo, vendorCode);
|
||||||
onAcquiredInternal(acquireInfo, vendorCode, shouldSend);
|
onAcquiredInternal(acquireInfo, vendorCode, shouldSend);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean successHapticsEnabled() {
|
|
||||||
return mCustomHaptics
|
|
||||||
? Settings.Global.getInt(mContentResolver, "face_success_enabled", 1) == 0
|
|
||||||
: super.successHapticsEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean errorHapticsEnabled() {
|
|
||||||
return mCustomHaptics
|
|
||||||
? Settings.Global.getInt(mContentResolver, "face_error_enabled", 1) == 0
|
|
||||||
: super.errorHapticsEnabled();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ package com.android.server.biometrics.sensors.fingerprint.aidl;
|
|||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.app.TaskStackListener;
|
import android.app.TaskStackListener;
|
||||||
import android.content.ContentResolver;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.hardware.biometrics.BiometricAuthenticator;
|
import android.hardware.biometrics.BiometricAuthenticator;
|
||||||
import android.hardware.biometrics.BiometricFingerprintConstants;
|
import android.hardware.biometrics.BiometricFingerprintConstants;
|
||||||
@@ -30,7 +29,6 @@ import android.hardware.biometrics.fingerprint.ISession;
|
|||||||
import android.hardware.fingerprint.IUdfpsOverlayController;
|
import android.hardware.fingerprint.IUdfpsOverlayController;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
|
|
||||||
import com.android.server.biometrics.Utils;
|
import com.android.server.biometrics.Utils;
|
||||||
@@ -57,9 +55,6 @@ class FingerprintAuthenticationClient extends AuthenticationClient<ISession> imp
|
|||||||
@Nullable private final IUdfpsOverlayController mUdfpsOverlayController;
|
@Nullable private final IUdfpsOverlayController mUdfpsOverlayController;
|
||||||
@Nullable private ICancellationSignal mCancellationSignal;
|
@Nullable private ICancellationSignal mCancellationSignal;
|
||||||
|
|
||||||
@NonNull private final ContentResolver mContentResolver;
|
|
||||||
private final boolean mCustomHaptics;
|
|
||||||
|
|
||||||
FingerprintAuthenticationClient(@NonNull Context context,
|
FingerprintAuthenticationClient(@NonNull Context context,
|
||||||
@NonNull LazyDaemon<ISession> lazyDaemon, @NonNull IBinder token,
|
@NonNull LazyDaemon<ISession> lazyDaemon, @NonNull IBinder token,
|
||||||
@NonNull ClientMonitorCallbackConverter listener, int targetUserId, long operationId,
|
@NonNull ClientMonitorCallbackConverter listener, int targetUserId, long operationId,
|
||||||
@@ -74,10 +69,6 @@ class FingerprintAuthenticationClient extends AuthenticationClient<ISession> imp
|
|||||||
lockoutCache, allowBackgroundAuthentication);
|
lockoutCache, allowBackgroundAuthentication);
|
||||||
mLockoutCache = lockoutCache;
|
mLockoutCache = lockoutCache;
|
||||||
mUdfpsOverlayController = udfpsOverlayController;
|
mUdfpsOverlayController = udfpsOverlayController;
|
||||||
|
|
||||||
mContentResolver = context.getContentResolver();
|
|
||||||
mCustomHaptics = Settings.Global.getInt(mContentResolver,
|
|
||||||
"fp_custom_success_error", 0) == 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -213,18 +204,4 @@ class FingerprintAuthenticationClient extends AuthenticationClient<ISession> imp
|
|||||||
UdfpsHelper.hideUdfpsOverlay(getSensorId(), mUdfpsOverlayController);
|
UdfpsHelper.hideUdfpsOverlay(getSensorId(), mUdfpsOverlayController);
|
||||||
mCallback.onClientFinished(this, false /* success */);
|
mCallback.onClientFinished(this, false /* success */);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean successHapticsEnabled() {
|
|
||||||
return mCustomHaptics
|
|
||||||
? Settings.Global.getInt(mContentResolver, "fp_success_enabled", 1) == 0
|
|
||||||
: super.successHapticsEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected boolean errorHapticsEnabled() {
|
|
||||||
return mCustomHaptics
|
|
||||||
? Settings.Global.getInt(mContentResolver, "fp_error_enabled", 1) == 0
|
|
||||||
: super.errorHapticsEnabled();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user