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

Commit 18817f3e authored by Ilya Matyukhin's avatar Ilya Matyukhin
Browse files

Fix UDFPS touch coordinates reported to the HAL

Bug: 189940935
Test: HAL logs
Change-Id: I4193d8a4ee21bfde49738ec7df05e4a28214ee48
parent dfbde545
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -405,9 +405,8 @@ public class UdfpsController implements DozeReceiver {
                        ? event.getPointerId(0)
                        : event.findPointerIndex(mActivePointerId);
                if (idx == event.getActionIndex()) {
                    final float x = event.getX(idx);
                    final float y = event.getY(idx);
                    if (isWithinSensorArea(udfpsView, x, y, fromUdfpsView)) {
                    if (isWithinSensorArea(udfpsView, event.getX(idx), event.getY(idx),
                            fromUdfpsView)) {
                        if (mVelocityTracker == null) {
                            // touches could be injected, so the velocity tracker may not have
                            // been initialized (via ACTION_DOWN).
@@ -427,7 +426,8 @@ public class UdfpsController implements DozeReceiver {
                        final long sinceLastLog = SystemClock.elapsedRealtime() - mTouchLogTime;
                        if (!isIlluminationRequested && !mGoodCaptureReceived &&
                                !exceedsVelocityThreshold) {
                            onFingerDown((int) x, (int) y, minor, major);
                            onFingerDown((int) event.getRawX(), (int) event.getRawY(), minor,
                                    major);
                            Log.v(TAG, "onTouch | finger down: " + touchInfo);
                            mTouchLogTime = SystemClock.elapsedRealtime();
                            mPowerManager.userActivity(SystemClock.uptimeMillis(),