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

Commit f26a3ab7 authored by Janis Danisevskis's avatar Janis Danisevskis
Browse files

Fix Parcelable::readParcelableVector<T>

Parcelable::readParcelableVector<T> was apparently never
used. It now is and needed some adjustments to actually
work.

Bug: 22914603
Change-Id: I58ead3b3956299d549cff245588f56f3220563d3
parent b2dcc3a1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -705,9 +705,9 @@ status_t Parcel::readParcelableVector(std::unique_ptr<std::vector<std::unique_pt
    }

    setDataPosition(start);
    val->reset(new std::vector<T>());
    val->reset(new std::vector<std::unique_ptr<T>>());

    status = unsafeReadTypedVector(val->get(), &Parcel::readParcelable);
    status = unsafeReadTypedVector(val->get(), &Parcel::readParcelable<T>);

    if (status != OK) {
        val->reset();