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

Commit 927a779f authored by Ilya Matyukhin's avatar Ilya Matyukhin Committed by Automerger Merge Worker
Browse files

Merge "Fix UDFPS touch coordinates reported to the HAL" into sc-dev am: aa12b6a4 am: 6a879da9

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

Change-Id: I9949ed0978a8c878ad26155da8a24509137c29da
parents 1090b5dd 6a879da9
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(),