libbinder_ndk: prune AParcel_readStatusHeader ret
Accidentally missing before.
Bug: 111445392
Test: atest android.binder.cts
Change-Id: I0f37c93161df3f8b84a9e9ff222d5de97b954ede
diff --git a/libs/binder/ndk/parcel.cpp b/libs/binder/ndk/parcel.cpp
index 29094db..7387d83 100644
--- a/libs/binder/ndk/parcel.cpp
+++ b/libs/binder/ndk/parcel.cpp
@@ -224,10 +224,10 @@
binder_status_t AParcel_readStatusHeader(const AParcel* parcel, AStatus** status) {
::android::binder::Status bstatus;
binder_status_t ret = PruneStatusT(bstatus.readFromParcel(*parcel->get()));
- if (ret == EX_NONE) {
+ if (ret == STATUS_OK) {
*status = new AStatus(std::move(bstatus));
}
- return ret;
+ return PruneStatusT(ret);
}
binder_status_t AParcel_writeString(AParcel* parcel, const char* string, size_t length) {