diff options
author | Ashwini Oruganti <ashfall@google.com> | 2019-12-04 13:21:09 -0800 |
---|---|---|
committer | Manjae Park <manjaepark@google.com> | 2019-12-16 12:39:48 -0800 |
commit | 3dec82d39a7f65245ab06fac61d26e37a3f18fde (patch) | |
tree | 2ba2d56266dae80e9948269fda67ca4df54684c2 | |
parent | e370589bc308feb1143bbf8206b417ccc3c19ccb (diff) | |
download | native-android-8.0.0_r47.tar.gz |
Don't leak input events to dumpsys on user buildsandroid-security-8.0.0_r54android-security-8.0.0_r53android-security-8.0.0_r52android-8.0.0_r51android-8.0.0_r50android-8.0.0_r49android-8.0.0_r48android-8.0.0_r47android-8.0.0_r46android-8.0.0_r45android-8.0.0_r44android-8.0.0_r43security-oc-releaseoreo-security-release
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.
Change-Id: I98c9c375f18963177bf0c1d8829a217b4ad4acc6
Merged-In: I98c9c375f18963177bf0c1d8829a217b4ad4acc6
(cherry picked from commit c2ddb61f37b2f7a1067534fc3a950c7fe4677818)
-rw-r--r-- | services/inputflinger/InputDispatcher.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp index 2efb340eba..f4df0a0086 100644 --- a/services/inputflinger/InputDispatcher.cpp +++ b/services/inputflinger/InputDispatcher.cpp @@ -3945,11 +3945,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() { @@ -3990,19 +3986,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"); } |