Merge "libbinder_ndk: prune errors on AStatus create" am: d8c1aa725d am: 9a61015cf2
am: 05efdc5710
Change-Id: I06de23eac0cd5857e96d0d916efa665e95d9a981
diff --git a/libs/binder/ndk/status.cpp b/libs/binder/ndk/status.cpp
index e0ae469..1f75b0b 100644
--- a/libs/binder/ndk/status.cpp
+++ b/libs/binder/ndk/status.cpp
@@ -27,11 +27,11 @@
}
AStatus* AStatus_fromExceptionCode(binder_exception_t exception) {
- return new AStatus(Status::fromExceptionCode(exception));
+ return new AStatus(Status::fromExceptionCode(PruneException(exception)));
}
AStatus* AStatus_fromExceptionCodeWithMessage(binder_exception_t exception, const char* message) {
- return new AStatus(Status::fromExceptionCode(exception, message));
+ return new AStatus(Status::fromExceptionCode(PruneException(exception), message));
}
AStatus* AStatus_fromServiceSpecificError(int32_t serviceSpecific) {
@@ -43,7 +43,7 @@
}
AStatus* AStatus_fromStatus(binder_status_t status) {
- return new AStatus(Status::fromStatusT(status));
+ return new AStatus(Status::fromStatusT(PruneStatusT(status)));
}
bool AStatus_isOk(const AStatus* status) {