diff options
author | 2020-11-07 05:01:20 +0000 | |
---|---|---|
committer | 2020-11-07 05:01:20 +0000 | |
commit | e56cd511efc9452c377f0ab860b146031c1e5b0f (patch) | |
tree | 27d512ae6195c5ee55c99fc6fac2ea78af72d45d /libs/binder/Parcel.cpp | |
parent | b1d6aaa8a57ab386fbcf47b6de7ed69c691e908a (diff) | |
parent | 18220909f0e913e476d235fb4a7f1fb9eb1876c2 (diff) |
Merge "Double speed of Parcel.writeString()."
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r-- | libs/binder/Parcel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 40dd09b180..27cf97c945 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -1068,6 +1068,7 @@ status_t Parcel::writeString8(const char* str, size_t len) { 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 @@ status_t Parcel::writeString16(const char16_t* str, size_t len) { 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); |