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 {
|
||||
|
||||
/**
|
||||
* 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()
|
||||
}
|
||||
|
||||
@@ -813,7 +813,11 @@ public class UdfpsController implements DozeReceiver {
|
||||
final UdfpsView view = mOverlay.getOverlayView();
|
||||
if (view != null) {
|
||||
view.startIllumination(() -> {
|
||||
mFingerprintManager.onUiReady(requestId, mSensorId);
|
||||
if (mAlternateTouchProvider != null) {
|
||||
mAlternateTouchProvider.onUiReady();
|
||||
} else {
|
||||
mFingerprintManager.onUiReady(requestId, mSensorId);
|
||||
}
|
||||
mLatencyTracker.onActionEnd(LatencyTracker.ACTION_UDFPS_ILLUMINATE);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user