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
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h
index 2685bcc..1c355c4 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -705,9 +705,9 @@
}
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();