From f7c99f3f2404f9605c2801caa20b236a595afa3d Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Fri, 3 Dec 2021 10:37:54 +0000 Subject: Revert "Reland "Remove x/y offset from MotionEntry"" Revert submission 16336498-revert-16306432-revert-16295572-ORWQJPYRMQ-IQBEBXXQNX Reason for revert: b/208849306 Reverted Changes: I5afb6f7fd:Reland "Remove x/y offset from MotionEntry" I68b5619bf:Reland "Input injection: Assume transformed values... Change-Id: Id944e4eb39b26e3ffd51998b315a06e87a2af3d5 --- libs/input/Input.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libs/input/Input.cpp') diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp index 69ea7dfcb5..8974b22c86 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -343,6 +343,11 @@ void PointerCoords::scale(float globalScaleFactor, float windowXScale, float win scaleAxisValue(*this, AMOTION_EVENT_AXIS_RELATIVE_Y, windowYScale); } +void PointerCoords::applyOffset(float xOffset, float yOffset) { + setAxisValue(AMOTION_EVENT_AXIS_X, getX() + xOffset); + setAxisValue(AMOTION_EVENT_AXIS_Y, getY() + yOffset); +} + #ifdef __linux__ status_t PointerCoords::readFromParcel(Parcel* parcel) { bits = parcel->readInt64(); -- cgit v1.2.3-59-g8ed1b