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

Commit 6faf8ed9 authored by Steven Moreland's avatar Steven Moreland
Browse files

no use readString16Inplace

This uses readString16Inplace, which we may try to remove, in order to
make it possible libbinder can use utf-8 internally (and save space).

Bug: 172502290
Test: boot
Change-Id: I7555abe63754ffb477f4fcd98e9bf886d3fba52e
parent 2a692162
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -94,12 +94,12 @@ status_t CaptureRequest::readFromParcel(const android::Parcel* parcel) {
    // Do not distinguish null arrays from 0-sized arrays.
    for (int32_t i = 0; i < size; ++i) {
        // Parcel.writeParcelableArray
        size_t len;
        const char16_t* className = parcel->readString16Inplace(&len);
        std::optional<std::string> className;
        parcel->readUtf8FromUtf16(&className);
        ALOGV("%s: Read surface class = %s", __FUNCTION__,
              className != NULL ? String8(className).string() : "<null>");
              className.value_or("<null>").c_str());

        if (className == NULL) {
        if (className == std::nullopt) {
            continue;
        }