diff options
Diffstat (limited to 'include/binder')
-rw-r--r-- | include/binder/IPCThreadState.h | 2 | ||||
-rw-r--r-- | include/binder/Parcel.h | 18 |
2 files changed, 12 insertions, 8 deletions
diff --git a/include/binder/IPCThreadState.h b/include/binder/IPCThreadState.h index 691ba2f..3378d97 100644 --- a/include/binder/IPCThreadState.h +++ b/include/binder/IPCThreadState.h @@ -41,7 +41,6 @@ public: int getCallingPid(); int getCallingUid(); - int getOrigCallingUid(); void setStrictModePolicy(int32_t policy); int32_t getStrictModePolicy() const; @@ -117,7 +116,6 @@ private: status_t mLastError; pid_t mCallingPid; uid_t mCallingUid; - uid_t mOrigCallingUid; int32_t mStrictModePolicy; int32_t mLastTransactionBinderFlags; }; diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h index 877b17c..3ff95d2 100644 --- a/include/binder/Parcel.h +++ b/include/binder/Parcel.h @@ -285,9 +285,12 @@ status_t Parcel::write(const LightFlattenable<T>& val) { return err; } } - void* buffer = writeInplace(size); - return buffer == NULL ? NO_MEMORY : - val.flatten(buffer); + if (size) { + void* buffer = writeInplace(size); + return buffer == NULL ? NO_MEMORY : + val.flatten(buffer); + } + return NO_ERROR; } template<typename T> @@ -303,9 +306,12 @@ status_t Parcel::read(LightFlattenable<T>& val) const { } size = s; } - void const* buffer = readInplace(size); - return buffer == NULL ? NO_MEMORY : - val.unflatten(buffer, size); + if (size) { + void const* buffer = readInplace(size); + return buffer == NULL ? NO_MEMORY : + val.unflatten(buffer, size); + } + return NO_ERROR; } // --------------------------------------------------------------------------- |