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

Commit f28044d2 authored by Evan Rosky's avatar Evan Rosky
Browse files

Part of compatibility getRaw() support

Many apps currently mis-use getRaw APIs assuming they just
mean screen-space. Until they are educated about it, we need
to add this compatibility layer to apply rotation-only to
getRaw API output. This is a small part of the change, the
rest is in frameworks/native.

Bug: 179274888
Test: atest inputflinger_tests:InputDispatcherTest
Change-Id: I5f3ddf885f6b348201bfc92be128d9a36104abc8
parent 08d64fbc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -155,7 +155,8 @@ status_t NativeInputEventSender::sendMotionEvent(uint32_t seq, const MotionEvent
                                                   event->getYPrecision(),
                                                   event->getRawXCursorPosition(),
                                                   event->getRawYCursorPosition(),
                                                   event->getDownTime(),
                                                   event->getDisplaySize().x,
                                                   event->getDisplaySize().y, event->getDownTime(),
                                                   event->getHistoricalEventTime(i),
                                                   event->getPointerCount(),
                                                   event->getPointerProperties(),
+2 −1
Original line number Diff line number Diff line
@@ -378,7 +378,8 @@ static jlong android_view_MotionEvent_nativeInitialize(
                      flags, edgeFlags, metaState, buttonState,
                      static_cast<MotionClassification>(classification), transform, xPrecision,
                      yPrecision, AMOTION_EVENT_INVALID_CURSOR_POSITION,
                      AMOTION_EVENT_INVALID_CURSOR_POSITION, downTimeNanos, eventTimeNanos,
                      AMOTION_EVENT_INVALID_CURSOR_POSITION, AMOTION_EVENT_INVALID_DISPLAY_SIZE,
                      AMOTION_EVENT_INVALID_DISPLAY_SIZE, downTimeNanos, eventTimeNanos,
                      pointerCount, pointerProperties, rawPointerCoords);

    return reinterpret_cast<jlong>(event.release());