Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdedd17d authored by Austin Delgado's avatar Austin Delgado Committed by Android (Google) Code Review
Browse files

Merge "Add setIgnoreDisplayTouches to FingerprintManager" into 24D1-dev

parents 82fb3816 028d8aa7
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -725,6 +725,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
+8 −0
Original line number Diff line number Diff line
@@ -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
+3 −0
Original line number Diff line number Diff line
@@ -202,6 +202,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);
+10 −0
Original line number Diff line number Diff line
@@ -1005,6 +1005,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.
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ abstract class UdfpsAnimationViewController<T : UdfpsAnimationView>(
    override fun onViewDetached() {
        dialogManager.unregisterListener(dialogListener)
        dumpManager.unregisterDumpable(dumpTag)
        udfpsOverlayInteractor.setHandleTouches(shouldHandle = !shouldPauseAuth())
        udfpsOverlayInteractor.setHandleTouches(false)
    }

    /**
Loading