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

Commit 18220909 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Steven Moreland
Browse files

Double speed of Parcel.writeString().

updating docs

Bug: 172562452
Change-Id: I57754eac7af235a0a1bce9642d4923856bb04b78
Merged-In: I57754eac7af235a0a1bce9642d4923856bb04b78
parent b1d6aaa8
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);