Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73b867a6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Double speed of Parcel.writeString()." am: e56cd511 am: c680ef27 am: 896954c5

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1490956

Change-Id: I21a64685cf4c1423f7505ce71da8ef8344be9ec6
parents 7e8fb1d4 896954c5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);