summaryrefslogtreecommitdiffstats
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index c7bdcbc..7a5919f 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -22,12 +22,13 @@
#include <binder/IPCThreadState.h>
#include <binder/Binder.h>
#include <binder/BpBinder.h>
-#include <utils/Debug.h>
#include <binder/ProcessState.h>
+#include <binder/TextOutput.h>
+
+#include <utils/Debug.h>
#include <utils/Log.h>
#include <utils/String8.h>
#include <utils/String16.h>
-#include <utils/TextOutput.h>
#include <utils/misc.h>
#include <utils/Flattenable.h>
#include <cutils/ashmem.h>
@@ -797,13 +798,13 @@ status_t Parcel::writeBlob(size_t len, WritableBlob* outBlob)
return status;
}
-status_t Parcel::write(const Flattenable& val)
+status_t Parcel::write(const FlattenableHelperInterface& val)
{
status_t err;
// size if needed
- size_t len = val.getFlattenedSize();
- size_t fd_count = val.getFdCount();
+ const size_t len = val.getFlattenedSize();
+ const size_t fd_count = val.getFdCount();
err = this->writeInt32(len);
if (err) return err;
@@ -812,7 +813,7 @@ status_t Parcel::write(const Flattenable& val)
if (err) return err;
// payload
- void* buf = this->writeInplace(PAD_SIZE(len));
+ void* const buf = this->writeInplace(PAD_SIZE(len));
if (buf == NULL)
return BAD_VALUE;
@@ -1173,14 +1174,14 @@ status_t Parcel::readBlob(size_t len, ReadableBlob* outBlob) const
return NO_ERROR;
}
-status_t Parcel::read(Flattenable& val) const
+status_t Parcel::read(FlattenableHelperInterface& val) const
{
// size
const size_t len = this->readInt32();
const size_t fd_count = this->readInt32();
// payload
- void const* buf = this->readInplace(PAD_SIZE(len));
+ void const* const buf = this->readInplace(PAD_SIZE(len));
if (buf == NULL)
return BAD_VALUE;