Loading core/java/android/hardware/fingerprint/FingerprintManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -698,6 +698,25 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing } } /** * Set whether the HAL should ignore display touches. * Only applies to sensors where the HAL is reponsible for handling touches. * @hide */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) public void setIgnoreDisplayTouches(long requestId, int sensorId, boolean ignoreTouch) { if (mService == null) { Slog.w(TAG, "setIgnoreDisplayTouches: no fingerprint service"); return; } try { mService.setIgnoreDisplayTouches(requestId, sensorId, ignoreTouch); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Request fingerprint enrollment. This call warms up the fingerprint hardware * and starts scanning for fingerprints. Progress will be indicated by callbacks to the Loading core/java/android/hardware/fingerprint/FingerprintSensorPropertiesInternal.java +8 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,14 @@ public class FingerprintSensorPropertiesInternal extends SensorPropertiesInterna } } /** * Returns if sensor type is ultrasonic Udfps * @return true if sensor is ultrasonic Udfps, false otherwise */ public boolean isUltrasonicUdfps() { return sensorType == TYPE_UDFPS_ULTRASONIC; } /** * Returns if sensor type is side-FPS * @return true if sensor is side-fps, false otherwise Loading core/java/android/hardware/fingerprint/IFingerprintService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,9 @@ interface IFingerprintService { @EnforcePermission("USE_BIOMETRIC_INTERNAL") void onUdfpsUiEvent(int event, long requestId, int sensorId); @EnforcePermission("USE_BIOMETRIC_INTERNAL") void setIgnoreDisplayTouches(long requestId, int sensorId, boolean ignoreTouches); // Sets the controller for managing the UDFPS overlay. @EnforcePermission("USE_BIOMETRIC_INTERNAL") void setUdfpsOverlayController(in IUdfpsOverlayController controller); Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +10 −0 Original line number Diff line number Diff line Loading @@ -994,6 +994,16 @@ public class AuthController implements return getUdfpsProps() != null && !getUdfpsProps().isEmpty(); } /** * @return true if ultrasonic udfps HW is supported on this device. Can return true even if * the user has not enrolled udfps. This may be false if called before * onAllAuthenticatorsRegistered. */ public boolean isUltrasonicUdfpsSupported() { return getUdfpsProps() != null && !getUdfpsProps().isEmpty() && getUdfpsProps() .get(0).isUltrasonicUdfps(); } /** * @return true if sfps HW is supported on this device. Can return true even if the user has * not enrolled sfps. This may be false if called before onAllAuthenticatorsRegistered. Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +10 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { @Override public void showUdfpsOverlay(long requestId, int sensorId, int reason, @NonNull IUdfpsOverlayControllerCallback callback) { mUdfpsOverlayInteractor.setRequestId(requestId); mFgExecutor.execute(() -> UdfpsController.this.showUdfpsOverlay( new UdfpsControllerOverlay( mContext, Loading Loading @@ -404,6 +405,15 @@ public class UdfpsController implements DozeReceiver, Dumpable { handler::post, authenticationCallback); } /** * Debug to run setIgnoreDisplayTouches */ public void debugSetIgnoreDisplayTouches(boolean ignoreTouch) { final long requestId = (mOverlay != null) ? mOverlay.getRequestId() : 0L; UdfpsController.this.mFingerprintManager.setIgnoreDisplayTouches( requestId, mSensorProps.sensorId, ignoreTouch); } } /** Loading Loading
core/java/android/hardware/fingerprint/FingerprintManager.java +19 −0 Original line number Diff line number Diff line Loading @@ -698,6 +698,25 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing } } /** * Set whether the HAL should ignore display touches. * Only applies to sensors where the HAL is reponsible for handling touches. * @hide */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) public void setIgnoreDisplayTouches(long requestId, int sensorId, boolean ignoreTouch) { if (mService == null) { Slog.w(TAG, "setIgnoreDisplayTouches: no fingerprint service"); return; } try { mService.setIgnoreDisplayTouches(requestId, sensorId, ignoreTouch); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Request fingerprint enrollment. This call warms up the fingerprint hardware * and starts scanning for fingerprints. Progress will be indicated by callbacks to the Loading
core/java/android/hardware/fingerprint/FingerprintSensorPropertiesInternal.java +8 −0 Original line number Diff line number Diff line Loading @@ -119,6 +119,14 @@ public class FingerprintSensorPropertiesInternal extends SensorPropertiesInterna } } /** * Returns if sensor type is ultrasonic Udfps * @return true if sensor is ultrasonic Udfps, false otherwise */ public boolean isUltrasonicUdfps() { return sensorType == TYPE_UDFPS_ULTRASONIC; } /** * Returns if sensor type is side-FPS * @return true if sensor is side-fps, false otherwise Loading
core/java/android/hardware/fingerprint/IFingerprintService.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,9 @@ interface IFingerprintService { @EnforcePermission("USE_BIOMETRIC_INTERNAL") void onUdfpsUiEvent(int event, long requestId, int sensorId); @EnforcePermission("USE_BIOMETRIC_INTERNAL") void setIgnoreDisplayTouches(long requestId, int sensorId, boolean ignoreTouches); // Sets the controller for managing the UDFPS overlay. @EnforcePermission("USE_BIOMETRIC_INTERNAL") void setUdfpsOverlayController(in IUdfpsOverlayController controller); Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +10 −0 Original line number Diff line number Diff line Loading @@ -994,6 +994,16 @@ public class AuthController implements return getUdfpsProps() != null && !getUdfpsProps().isEmpty(); } /** * @return true if ultrasonic udfps HW is supported on this device. Can return true even if * the user has not enrolled udfps. This may be false if called before * onAllAuthenticatorsRegistered. */ public boolean isUltrasonicUdfpsSupported() { return getUdfpsProps() != null && !getUdfpsProps().isEmpty() && getUdfpsProps() .get(0).isUltrasonicUdfps(); } /** * @return true if sfps HW is supported on this device. Can return true even if the user has * not enrolled sfps. This may be false if called before onAllAuthenticatorsRegistered. Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +10 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { @Override public void showUdfpsOverlay(long requestId, int sensorId, int reason, @NonNull IUdfpsOverlayControllerCallback callback) { mUdfpsOverlayInteractor.setRequestId(requestId); mFgExecutor.execute(() -> UdfpsController.this.showUdfpsOverlay( new UdfpsControllerOverlay( mContext, Loading Loading @@ -404,6 +405,15 @@ public class UdfpsController implements DozeReceiver, Dumpable { handler::post, authenticationCallback); } /** * Debug to run setIgnoreDisplayTouches */ public void debugSetIgnoreDisplayTouches(boolean ignoreTouch) { final long requestId = (mOverlay != null) ? mOverlay.getRequestId() : 0L; UdfpsController.this.mFingerprintManager.setIgnoreDisplayTouches( requestId, mSensorProps.sensorId, ignoreTouch); } } /** Loading