diff options
author | Kevin F. Haggerty <haggertk@lineageos.org> | 2020-02-03 21:42:52 -0700 |
---|---|---|
committer | Kevin F. Haggerty <haggertk@lineageos.org> | 2020-02-03 21:42:52 -0700 |
commit | 334e240293184c33182cc8a3bb2b6dce288d34ef (patch) | |
tree | 72961cbabffdb382dc8de6b4fb0b38dbe308412a | |
parent | 5c965fc12f8c84a7478107b27420f19d08483001 (diff) | |
parent | 5dd8c54fe37a50f4cbf2769176509e90ef42ddf0 (diff) | |
download | android_frameworks_native-lineage-15.1.tar.gz android_frameworks_native-lineage-15.1.tar.bz2 android_frameworks_native-lineage-15.1.zip |
Merge tag 'android-8.1.0_r73' into staging/lineage-15.1_merge-android-8.1.0_r73lineage-15.1
Android 8.1.0 Release 73 (6107733)
* tag 'android-8.1.0_r73':
Don't leak input events to dumpsys on user builds
Resize object capacity when shrinking Parcel
Change-Id: I2c7ef27427de1fc92c088df28dd7cc41e39179d0
-rw-r--r-- | libs/binder/Parcel.cpp | 2 | ||||
-rw-r--r-- | services/inputflinger/InputDispatcher.cpp | 20 |
2 files changed, 4 insertions, 18 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 59a363f8d..89516bc11 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -2713,11 +2713,13 @@ status_t Parcel::continueWrite(size_t desired) if (objectsSize == 0) { free(mObjects); mObjects = nullptr; + mObjectsCapacity = 0; } else { binder_size_t* objects = (binder_size_t*)realloc(mObjects, objectsSize*sizeof(binder_size_t)); if (objects) { mObjects = objects; + mObjectsCapacity = objectsSize; } } mObjectsSize = objectsSize; diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp index 14143cbb3..aed16bff2 100644 --- a/services/inputflinger/InputDispatcher.cpp +++ b/services/inputflinger/InputDispatcher.cpp @@ -3960,11 +3960,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() { @@ -4005,19 +4001,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"); } |