Merge "Add onUiReady to AlternativeTouchProvider" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6bcd7fdc9a
@@ -22,6 +22,8 @@ package com.android.systemui.biometrics
|
|||||||
interface AlternateUdfpsTouchProvider {
|
interface AlternateUdfpsTouchProvider {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* onPointerDown:
|
||||||
|
*
|
||||||
* This operation is used to notify the Fingerprint HAL that
|
* This operation is used to notify the Fingerprint HAL that
|
||||||
* a fingerprint has been detected on the device's screen.
|
* a fingerprint has been detected on the device's screen.
|
||||||
*
|
*
|
||||||
@@ -39,4 +41,14 @@ interface AlternateUdfpsTouchProvider {
|
|||||||
* See fingerprint/ISession#onPointerUp for more details.
|
* See fingerprint/ISession#onPointerUp for more details.
|
||||||
*/
|
*/
|
||||||
fun onPointerUp(pointerId: Long)
|
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()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -813,7 +813,11 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
final UdfpsView view = mOverlay.getOverlayView();
|
final UdfpsView view = mOverlay.getOverlayView();
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
view.startIllumination(() -> {
|
view.startIllumination(() -> {
|
||||||
|
if (mAlternateTouchProvider != null) {
|
||||||
|
mAlternateTouchProvider.onUiReady();
|
||||||
|
} else {
|
||||||
mFingerprintManager.onUiReady(requestId, mSensorId);
|
mFingerprintManager.onUiReady(requestId, mSensorId);
|
||||||
|
}
|
||||||
mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE);
|
mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -594,9 +594,8 @@ public class UdfpsControllerTest extends SysuiTestCase {
|
|||||||
verify(mLatencyTracker, never()).onActionEnd(eq(LatencyTracker.ACTION_UDFPS_ILLUMINATE));
|
verify(mLatencyTracker, never()).onActionEnd(eq(LatencyTracker.ACTION_UDFPS_ILLUMINATE));
|
||||||
// AND onIlluminatedRunnable notifies FingerprintManager about onUiReady
|
// AND onIlluminatedRunnable notifies FingerprintManager about onUiReady
|
||||||
mOnIlluminatedRunnableCaptor.getValue().run();
|
mOnIlluminatedRunnableCaptor.getValue().run();
|
||||||
InOrder inOrder = inOrder(mFingerprintManager, mLatencyTracker);
|
InOrder inOrder = inOrder(mAlternateTouchProvider, mLatencyTracker);
|
||||||
inOrder.verify(mFingerprintManager).onUiReady(
|
inOrder.verify(mAlternateTouchProvider).onUiReady();
|
||||||
eq(TEST_REQUEST_ID), eq(mUdfpsController.mSensorId));
|
|
||||||
inOrder.verify(mLatencyTracker).onActionEnd(eq(LatencyTracker.ACTION_UDFPS_ILLUMINATE));
|
inOrder.verify(mLatencyTracker).onActionEnd(eq(LatencyTracker.ACTION_UDFPS_ILLUMINATE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user