diff options
author | 2020-04-09 11:47:39 -0700 | |
---|---|---|
committer | 2020-04-10 17:35:46 +0000 | |
commit | 786264713cf9d9c9e3d45ffcc5315ea592c6736b (patch) | |
tree | 8078b823db2a7d17c350204bde4b488194af9cb3 /libs/binder/Status.cpp | |
parent | e5c824b24c8f217ef363557f548cef7ceeb2d097 (diff) |
Status: don't ignore status in writeToParcel
While it may be safe in practice, we should not rely on it.
Bug: n/A
Test: n/A
Change-Id: Id33d577f64449b966bdf6327c9a37886b435ed7c
Diffstat (limited to 'libs/binder/Status.cpp')
-rw-r--r-- | libs/binder/Status.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/binder/Status.cpp b/libs/binder/Status.cpp index 674f0657a9..64ab7a9d14 100644 --- a/libs/binder/Status.cpp +++ b/libs/binder/Status.cpp @@ -193,13 +193,15 @@ status_t Status::writeToParcel(Parcel* parcel) const { } status_t status = parcel->writeInt32(mException); - if (status != OK) { return status; } + if (status != OK) return status; if (mException == EX_NONE) { // We have no more information to write. return status; } status = parcel->writeString16(String16(mMessage)); + if (status != OK) return status; status = parcel->writeInt32(0); // Empty remote stack trace header + if (status != OK) return status; if (mException == EX_SERVICE_SPECIFIC) { status = parcel->writeInt32(mErrorCode); } else if (mException == EX_PARCELABLE) { |