summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2018-08-22 13:49:32 +0100
committerMichael Wright <michaelwr@google.com>2018-08-22 13:49:32 +0100
commitc597d61a615091f3d7176fa0cb3efc56b3dbda66 (patch)
treeda232553344bbd47faae57886822fe0df9664481
parent22f1e9cfb73cc53b0417d3a27b901cccb2b4b4bc (diff)
downloadnative-c597d61a615091f3d7176fa0cb3efc56b3dbda66.tar.gz
Fix a typo when checking a touch is within the physical frame.
Bug: 112876936 Test: enable notchless simulation, try seascape apps, try swiping down Change-Id: I8a155e16c19c474e605cb5a8d938e04461646027
-rw-r--r--services/inputflinger/InputReader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index 4c4786fea8..0b7e850452 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -6547,7 +6547,7 @@ void TouchInputMapper::cancelTouch(nsecs_t when) {
bool TouchInputMapper::isPointInsideSurface(int32_t x, int32_t y) {
const float scaledX = x * mXScale;
- const float scaledY = x * mYScale;
+ const float scaledY = y * mYScale;
return x >= mRawPointerAxes.x.minValue && x <= mRawPointerAxes.x.maxValue
&& scaledX >= mPhysicalLeft && scaledX <= mPhysicalLeft + mPhysicalWidth
&& y >= mRawPointerAxes.y.minValue && y <= mRawPointerAxes.y.maxValue