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

Commit 17d6484e authored by arthurhung's avatar arthurhung
Browse files

Add logging for MT_TOOL_PALM usage

Add some logs when we receive the palm event. That could help us to
understand if the device can receive palm event and the pointer cancel
is actually dispatched.

Bug: 161655782
Test: manual, enabled twoshay and check logs.
Change-Id: Ic8a8314473e42f8f35ca12f9dad18b7d92eb8622
parent 16613a0d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -268,6 +268,10 @@ void MultiTouchInputMapper::syncTouch(nsecs_t when, RawState* outState) {
            if (id) {
                outState->rawPointerData.canceledIdBits.markBit(id.value());
            }
#if DEBUG_POINTERS
            ALOGI("Stop processing slot %zu for it received a palm event from device %s", inIndex,
                  getDeviceName().c_str());
#endif
            continue;
        }

+3 −0
Original line number Diff line number Diff line
@@ -1890,6 +1890,9 @@ void TouchInputMapper::dispatchTouches(nsecs_t when, uint32_t policyFlags) {
        while (!upIdBits.isEmpty()) {
            uint32_t upId = upIdBits.clearFirstMarkedBit();
            bool isCanceled = mCurrentCookedState.cookedPointerData.canceledIdBits.hasBit(upId);
            if (isCanceled) {
                ALOGI("Canceling pointer %d for the palm event was detected.", upId);
            }
            dispatchMotion(when, policyFlags, mSource, AMOTION_EVENT_ACTION_POINTER_UP, 0,
                           isCanceled ? AMOTION_EVENT_FLAG_CANCELED : 0, metaState, buttonState, 0,
                           mLastCookedState.cookedPointerData.pointerProperties,