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

Commit 6bcd7fdc authored by Ilya Matyukhin's avatar Ilya Matyukhin Committed by Android (Google) Code Review
Browse files

Merge "Add onUiReady to AlternativeTouchProvider" into tm-dev

parents 7d130a7e 5f370708
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ package com.android.systemui.biometrics
interface AlternateUdfpsTouchProvider {

    /**
     * onPointerDown:
     *
     * This operation is used to notify the Fingerprint HAL that
     * a fingerprint has been detected on the device's screen.
     *
@@ -39,4 +41,14 @@ interface AlternateUdfpsTouchProvider {
     * See fingerprint/ISession#onPointerUp for more details.
     */
    fun onPointerUp(pointerId: Long)

    /**
     * onUiReady:
     *
     * This operation is used by the callee to notify the Fingerprint HAL that SystemUI is
     * correctly configured for the fingerprint capture.
     *
     * See fingerprint/ISession#onUiReady for more details.
     */
    fun onUiReady()
}
+5 −1
Original line number Diff line number Diff line
@@ -813,7 +813,11 @@ public class UdfpsController implements DozeReceiver {
        final UdfpsView view = mOverlay.getOverlayView();
        if (view != null) {
            view.startIllumination(() -> {
                if (mAlternateTouchProvider != null) {
                    mAlternateTouchProvider.onUiReady();
                } else {
                    mFingerprintManager.onUiReady(requestId, mSensorId);
                }
                mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE);
            });
        }
+2 −3
Original line number Diff line number Diff line
@@ -594,9 +594,8 @@ public class UdfpsControllerTest extends SysuiTestCase {
        verify(mLatencyTracker, never()).onActionEnd(eq(LatencyTracker.ACTION_UDFPS_ILLUMINATE));
        // AND onIlluminatedRunnable notifies FingerprintManager about onUiReady
        mOnIlluminatedRunnableCaptor.getValue().run();
        InOrder inOrder = inOrder(mFingerprintManager, mLatencyTracker);
        inOrder.verify(mFingerprintManager).onUiReady(
                eq(TEST_REQUEST_ID), eq(mUdfpsController.mSensorId));
        InOrder inOrder = inOrder(mAlternateTouchProvider, mLatencyTracker);
        inOrder.verify(mAlternateTouchProvider).onUiReady();
        inOrder.verify(mLatencyTracker).onActionEnd(eq(LatencyTracker.ACTION_UDFPS_ILLUMINATE));
    }