diff options
| author | 2018-12-05 12:56:10 -0800 | |
|---|---|---|
| committer | 2018-12-12 14:35:30 -0800 | |
| commit | 2f82d5b89284c27ff6454da43369b1112f7b15d7 (patch) | |
| tree | cd39e0c2236c9c3d1954b199da862f330f0c4b7c /libs/binder/Parcel.cpp | |
| parent | ec2d87ab6ecaa721d7e46a438156bcab89a12459 (diff) | |
binder: add read/writeUint64Vector functions
Intended to help clean up a shoehorning of an vector<uint64_t>
into a Int64Vector in libgui/surfaceflinger.
Bug: 120504999
Test: boot
Test: 1 new libbinder_test, BinderLibTest.VectorSent
Change-Id: Ifd42f31d75565165dd652084298f16440e69ee74
Diffstat (limited to 'libs/binder/Parcel.cpp')
| -rw-r--r-- | libs/binder/Parcel.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index ab94719cc7..d285030c1b 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -878,6 +878,16 @@ status_t Parcel::writeInt64Vector(const std::unique_ptr<std::vector<int64_t>>& v return writeNullableTypedVector(val, &Parcel::writeInt64); } +status_t Parcel::writeUint64Vector(const std::vector<uint64_t>& val) +{ + return writeTypedVector(val, &Parcel::writeUint64); +} + +status_t Parcel::writeUint64Vector(const std::unique_ptr<std::vector<uint64_t>>& val) +{ + return writeNullableTypedVector(val, &Parcel::writeUint64); +} + status_t Parcel::writeFloatVector(const std::vector<float>& val) { return writeTypedVector(val, &Parcel::writeFloat); @@ -1739,6 +1749,14 @@ status_t Parcel::readInt64Vector(std::vector<int64_t>* val) const { return readTypedVector(val, &Parcel::readInt64); } +status_t Parcel::readUint64Vector(std::unique_ptr<std::vector<uint64_t>>* val) const { + return readNullableTypedVector(val, &Parcel::readUint64); +} + +status_t Parcel::readUint64Vector(std::vector<uint64_t>* val) const { + return readTypedVector(val, &Parcel::readUint64); +} + status_t Parcel::readFloatVector(std::unique_ptr<std::vector<float>>* val) const { return readNullableTypedVector(val, &Parcel::readFloat); } |