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

Commit 64580491 authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Only call onFingerUp if finger was down" into sc-dev am: d35f3f20 am: 0ca543eb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15144908

Change-Id: I5701b8ca7bdd4e18bbdf040c0b80126a7eadfd78
parents 6ca3f8dd 0ca543eb
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ public class UdfpsController implements DozeReceiver {
    @Nullable private Runnable mCancelAodTimeoutAction;
    private boolean mScreenOn;
    private Runnable mAodInterruptRunnable;
    private boolean mOnFingerDown;

    @VisibleForTesting
    public static final AudioAttributes VIBRATION_SONIFICATION_ATTRIBUTES =
@@ -662,12 +663,12 @@ public class UdfpsController implements DozeReceiver {

    private void showUdfpsOverlay(@NonNull ServerRequest request) {
        mExecution.assertIsMainThread();

        final int reason = request.mRequestReason;
        if (mView == null) {
            try {
                Log.v(TAG, "showUdfpsOverlay | adding window reason=" + reason);
                mView = (UdfpsView) mInflater.inflate(R.layout.udfps_view, null, false);
                mOnFingerDown = false;
                mView.setSensorProperties(mSensorProps);
                mView.setHbmProvider(mHbmProvider);
                UdfpsAnimationViewController animation = inflateUdfpsAnimation(reason);
@@ -826,6 +827,7 @@ public class UdfpsController implements DozeReceiver {
            Log.w(TAG, "Null view in onFingerDown");
            return;
        }
        mOnFingerDown = true;
        mFingerprintManager.onPointerDown(mSensorProps.sensorId, x, y, minor, major);
        Trace.endAsyncSection("UdfpsController.e2e.onPointerDown", 0);
        Trace.beginAsyncSection("UdfpsController.e2e.startIllumination", 0);
@@ -843,7 +845,10 @@ public class UdfpsController implements DozeReceiver {
            Log.w(TAG, "Null view in onFingerUp");
            return;
        }
        if (mOnFingerDown) {
            mFingerprintManager.onPointerUp(mSensorProps.sensorId);
        }
        mOnFingerDown = false;
        if (mView.isIlluminationRequested()) {
            mView.stopIllumination();
        }