diff options
-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"); } |