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

Commit 46f79a21 authored by Steven Moreland's avatar Steven Moreland
Browse files

libgui: 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: I99761ebdcaa051363eabd9d577ca41b6d4d66880
parent 084e1948
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -72,13 +72,9 @@ status_t Surface::readFromParcel(const Parcel* parcel, bool nameAlreadyRead) {
}

String16 Surface::readMaybeEmptyString16(const Parcel* parcel) {
    size_t len;
    const char16_t* str = parcel->readString16Inplace(&len);
    if (str != nullptr) {
        return String16(str, len);
    } else {
        return String16();
    }
    std::optional<String16> str;
    parcel->readString16(&str);
    return str.value_or(String16());
}

} // namespace view