diff options
| author | 2020-12-02 17:23:27 +0000 | |
|---|---|---|
| committer | 2020-12-02 17:23:27 +0000 | |
| commit | 8662ab7f4b721d53744c1d98295ac6be5dd80bc7 (patch) | |
| tree | 768c2cb78b47b1ebcde364858f2270b98c4a3267 /libs | |
| parent | eed7614657ae82c12d6b3b01cbf8065ca663b8cf (diff) | |
| parent | 34b48cb773586c613788e20c74c63b83a9b0fe93 (diff) | |
Merge "libbinder: finish{F,Unf}lattenBinder symmetry"
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/binder/Parcel.cpp | 11 | ||||
| -rw-r--r-- | libs/binder/include/binder/Parcel.h | 3 |
2 files changed, 6 insertions, 8 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 7737d53ec0..a7d8df204c 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -164,12 +164,8 @@ static void release_object(const sp<ProcessState>& proc, ALOGE("Invalid object type 0x%08x", obj.hdr.type); } -status_t Parcel::finishFlattenBinder( - const sp<IBinder>& binder, const flat_binder_object& flat) +status_t Parcel::finishFlattenBinder(const sp<IBinder>& binder) { - status_t status = writeObject(flat, false); - if (status != OK) return status; - internal::Stability::tryMarkCompilationUnit(binder.get()); auto category = internal::Stability::getCategory(binder.get()); return writeInt32(category.repr()); @@ -238,7 +234,10 @@ status_t Parcel::flattenBinder(const sp<IBinder>& binder) obj.flags |= schedBits; - return finishFlattenBinder(binder, obj); + status_t status = writeObject(obj, false); + if (status != OK) return status; + + return finishFlattenBinder(binder); } status_t Parcel::unflattenBinder(sp<IBinder>* out) const diff --git a/libs/binder/include/binder/Parcel.h b/libs/binder/include/binder/Parcel.h index cfe1f3ae58..9f5260a424 100644 --- a/libs/binder/include/binder/Parcel.h +++ b/libs/binder/include/binder/Parcel.h @@ -522,8 +522,7 @@ private: status_t validateReadData(size_t len) const; void updateWorkSourceRequestHeaderPosition() const; - status_t finishFlattenBinder(const sp<IBinder>& binder, - const flat_binder_object& flat); + status_t finishFlattenBinder(const sp<IBinder>& binder); status_t finishUnflattenBinder(const sp<IBinder>& binder, sp<IBinder>* out) const; status_t flattenBinder(const sp<IBinder>& binder); status_t unflattenBinder(sp<IBinder>* out) const; |