commit | 896954c55a6ed3e8c982a0a7b59db0383b1a5562 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Sat Nov 07 06:02:10 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Sat Nov 07 06:02:10 2020 +0000 |
tree | 231bb558b8f5aaa18fadb60e69f1943474d1e28f | |
parent | 001089192b18f13e440d8732b7154a901fd9ba9f [diff] | |
parent | c680ef275c4fdc7712a36703e62f8d36576a55e7 [diff] |
Merge "Double speed of Parcel.writeString()." am: e56cd511ef am: c680ef275c Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1490956 Change-Id: Ibd1570dd5436793950c0a78adb47d6c4240eeef8
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 40dd09b..27cf97c 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp
@@ -1068,6 +1068,7 @@ { if (str == nullptr) return writeInt32(-1); + // NOTE: Keep this logic in sync with android_os_Parcel.cpp status_t err = writeInt32(len); if (err == NO_ERROR) { uint8_t* data = (uint8_t*)writeInplace(len+sizeof(char)); @@ -1108,6 +1109,7 @@ { if (str == nullptr) return writeInt32(-1); + // NOTE: Keep this logic in sync with android_os_Parcel.cpp status_t err = writeInt32(len); if (err == NO_ERROR) { len *= sizeof(char16_t);