summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshwini Oruganti <ashfall@google.com>2019-12-06 10:00:53 -0800
committerVasyl Gello <vasek.gello@gmail.com>2020-02-05 14:01:47 +0000
commitafeca9e145410fca652e1e6c8265013107711d39 (patch)
tree4f0f7c99a8f5b98a914e9dc0438dd28bde6f39aa
parent96094cdeca40b18491315afc8a13f793678d9b17 (diff)
downloadandroid_frameworks_native-cm-14.1.tar.gz
android_frameworks_native-cm-14.1.tar.bz2
android_frameworks_native-cm-14.1.zip
Don't leak input events to dumpsys on user buildscm-14.1
Remove the details of KeyEvent and MotionEvent logs. Bug: 139945049 Test: Tested on a device, the input functions work as expected and input event logs are not leaked to dumpsys on user builds. Merged-In: I98c9c375f18963177bf0c1d8829a217b4ad4acc6 (cherry picked from commit 3b7d779774cb81c5d922f74216392c9fd7004a1b) [basilgello: Back-ported to 14.1: - motionActionToString and keyActionToString helpers are not present] Signed-off-by: Vasyl Gello <vasek.gello@gmail.com> Change-Id: I98c9c375f18963177bf0c1d8829a217b4ad4acc6
-rw-r--r--services/inputflinger/InputDispatcher.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp
index a6b96b025..37e9038aa 100644
--- a/services/inputflinger/InputDispatcher.cpp
+++ b/services/inputflinger/InputDispatcher.cpp
@@ -4035,11 +4035,7 @@ InputDispatcher::KeyEntry::~KeyEntry() {
}
void InputDispatcher::KeyEntry::appendDescription(String8& msg) const {
- msg.appendFormat("KeyEvent(deviceId=%d, source=0x%08x, action=%d, "
- "flags=0x%08x, keyCode=%d, scanCode=%d, metaState=0x%08x, "
- "repeatCount=%d), policyFlags=0x%08x",
- deviceId, source, action, flags, keyCode, scanCode, metaState,
- repeatCount, policyFlags);
+ msg.appendFormat("KeyEvent");
}
void InputDispatcher::KeyEntry::recycle() {
@@ -4080,19 +4076,7 @@ InputDispatcher::MotionEntry::~MotionEntry() {
}
void InputDispatcher::MotionEntry::appendDescription(String8& msg) const {
- msg.appendFormat("MotionEvent(deviceId=%d, source=0x%08x, action=%d, actionButton=0x%08x, "
- "flags=0x%08x, metaState=0x%08x, buttonState=0x%08x, "
- "edgeFlags=0x%08x, xPrecision=%.1f, yPrecision=%.1f, displayId=%d, pointers=[",
- deviceId, source, action, actionButton, flags, metaState, buttonState, edgeFlags,
- xPrecision, yPrecision, displayId);
- for (uint32_t i = 0; i < pointerCount; i++) {
- if (i) {
- msg.append(", ");
- }
- msg.appendFormat("%d: (%.1f, %.1f)", pointerProperties[i].id,
- pointerCoords[i].getX(), pointerCoords[i].getY());
- }
- msg.appendFormat("]), policyFlags=0x%08x", policyFlags);
+ msg.appendFormat("MotionEvent");
}