frameworks/native
Revision | 539ce6da56c7d78b952b3d47dfc5f096ffe1b59e (tree) |
---|---|
Zeit | 2020-03-16 19:41:26 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Merge tag 'android-8.1.0_r74' into oreo-x86
Android 8.1.0 release 74
@@ -2713,11 +2713,13 @@ status_t Parcel::continueWrite(size_t desired) | ||
2713 | 2713 | if (objectsSize == 0) { |
2714 | 2714 | free(mObjects); |
2715 | 2715 | mObjects = nullptr; |
2716 | + mObjectsCapacity = 0; | |
2716 | 2717 | } else { |
2717 | 2718 | binder_size_t* objects = |
2718 | 2719 | (binder_size_t*)realloc(mObjects, objectsSize*sizeof(binder_size_t)); |
2719 | 2720 | if (objects) { |
2720 | 2721 | mObjects = objects; |
2722 | + mObjectsCapacity = objectsSize; | |
2721 | 2723 | } |
2722 | 2724 | } |
2723 | 2725 | mObjectsSize = objectsSize; |
@@ -562,7 +562,8 @@ void Sensor::flattenString8(void*& buffer, size_t& size, | ||
562 | 562 | uint32_t len = static_cast<uint32_t>(string8.length()); |
563 | 563 | FlattenableUtils::write(buffer, size, len); |
564 | 564 | memcpy(static_cast<char*>(buffer), string8.string(), len); |
565 | - FlattenableUtils::advance(buffer, size, FlattenableUtils::align<4>(len)); | |
565 | + FlattenableUtils::advance(buffer, size, len); | |
566 | + size -= FlattenableUtils::align<4>(buffer); | |
566 | 567 | } |
567 | 568 | |
568 | 569 | bool Sensor::unflattenString8(void const*& buffer, size_t& size, String8& outputString8) { |
@@ -3943,11 +3943,7 @@ InputDispatcher::KeyEntry::~KeyEntry() { | ||
3943 | 3943 | } |
3944 | 3944 | |
3945 | 3945 | void InputDispatcher::KeyEntry::appendDescription(String8& msg) const { |
3946 | - msg.appendFormat("KeyEvent(deviceId=%d, source=0x%08x, action=%d, " | |
3947 | - "flags=0x%08x, keyCode=%d, scanCode=%d, metaState=0x%08x, " | |
3948 | - "repeatCount=%d), policyFlags=0x%08x", | |
3949 | - deviceId, source, action, flags, keyCode, scanCode, metaState, | |
3950 | - repeatCount, policyFlags); | |
3946 | + msg.appendFormat("KeyEvent"); | |
3951 | 3947 | } |
3952 | 3948 | |
3953 | 3949 | void InputDispatcher::KeyEntry::recycle() { |
@@ -3988,19 +3984,7 @@ InputDispatcher::MotionEntry::~MotionEntry() { | ||
3988 | 3984 | } |
3989 | 3985 | |
3990 | 3986 | void InputDispatcher::MotionEntry::appendDescription(String8& msg) const { |
3991 | - msg.appendFormat("MotionEvent(deviceId=%d, source=0x%08x, action=%d, actionButton=0x%08x, " | |
3992 | - "flags=0x%08x, metaState=0x%08x, buttonState=0x%08x, " | |
3993 | - "edgeFlags=0x%08x, xPrecision=%.1f, yPrecision=%.1f, displayId=%d, pointers=[", | |
3994 | - deviceId, source, action, actionButton, flags, metaState, buttonState, edgeFlags, | |
3995 | - xPrecision, yPrecision, displayId); | |
3996 | - for (uint32_t i = 0; i < pointerCount; i++) { | |
3997 | - if (i) { | |
3998 | - msg.append(", "); | |
3999 | - } | |
4000 | - msg.appendFormat("%d: (%.1f, %.1f)", pointerProperties[i].id, | |
4001 | - pointerCoords[i].getX(), pointerCoords[i].getY()); | |
4002 | - } | |
4003 | - msg.appendFormat("]), policyFlags=0x%08x", policyFlags); | |
3987 | + msg.appendFormat("MotionEvent"); | |
4004 | 3988 | } |
4005 | 3989 | |
4006 | 3990 |