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
diff --git a/services/inputflinger/reader/mapper/MultiTouchInputMapper.cpp b/services/inputflinger/reader/mapper/MultiTouchInputMapper.cpp
index 0440f49..ca43123 100644
--- a/services/inputflinger/reader/mapper/MultiTouchInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/MultiTouchInputMapper.cpp
@@ -268,6 +268,10 @@
             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;
         }
 
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.cpp b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
index fb30b88..c87f10b 100644
--- a/services/inputflinger/reader/mapper/TouchInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
@@ -1890,6 +1890,9 @@
         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,