From f183395296328a0eb96065c1e426b91bbd11b54b Mon Sep 17 00:00:00 2001 From: Ronghua Wu Date: Mon, 16 Mar 2015 11:11:07 -0700 Subject: [PATCH] binder: add uint64 support to Parcel. Bug: 19620911 Change-Id: Ifce5319e4e35afd344dead67ab7ba1cd399476a3 (cherry picked from commit 2d13afdfa1f43973bf3cb917c7d6496a38baa446) --- include/binder/Parcel.h | 3 +++ libs/binder/Parcel.cpp | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h index a52e0443f..0ba3abebd 100644 --- a/include/binder/Parcel.h +++ b/include/binder/Parcel.h @@ -96,6 +96,7 @@ public: status_t writeInt32(int32_t val); status_t writeUint32(uint32_t val); status_t writeInt64(int64_t val); + status_t writeUint64(uint64_t val); status_t writeFloat(float val); status_t writeDouble(double val); status_t writeCString(const char* str); @@ -157,6 +158,8 @@ public: status_t readUint32(uint32_t *pArg) const; int64_t readInt64() const; status_t readInt64(int64_t *pArg) const; + uint64_t readUint64() const; + status_t readUint64(uint64_t *pArg) const; float readFloat() const; status_t readFloat(float *pArg) const; double readDouble() const; diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 09211860a..24c8a7755 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -677,6 +677,11 @@ status_t Parcel::writeInt64(int64_t val) return writeAligned(val); } +status_t Parcel::writeUint64(uint64_t val) +{ + return writeAligned(val); +} + status_t Parcel::writePointer(uintptr_t val) { return writeAligned(val); @@ -1060,6 +1065,16 @@ int64_t Parcel::readInt64() const return readAligned(); } +status_t Parcel::readUint64(uint64_t *pArg) const +{ + return readAligned(pArg); +} + +uint64_t Parcel::readUint64() const +{ + return readAligned(); +} + status_t Parcel::readPointer(uintptr_t *pArg) const { status_t ret;