Loading libs/binder/ndk/include_cpp/android/binder_auto_utils.h +3 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,9 @@ class ScopedAStatus : public impl::ScopedAResource<AStatus*, void, AStatus_delet public: /** * Takes ownership of a. * * WARNING: this constructor is only expected to be used when reading a * status value. Use `ScopedAStatus::ok()` instead. */ explicit ScopedAStatus(AStatus* a = nullptr) : ScopedAResource(a) {} ~ScopedAStatus() {} Loading libs/binder/ndk/status.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,8 @@ using ::android::status_t; using ::android::binder::Status; AStatus* AStatus_newOk() { return new AStatus(); static AStatus status = AStatus(); return &status; } AStatus* AStatus_fromExceptionCode(binder_exception_t exception) { Loading Loading @@ -78,8 +79,10 @@ void AStatus_deleteDescription(const char* description) { } void AStatus_delete(AStatus* status) { if (status != AStatus_newOk()) { delete status; } } binder_status_t PruneStatusT(status_t status) { switch (status) { Loading Loading
libs/binder/ndk/include_cpp/android/binder_auto_utils.h +3 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,9 @@ class ScopedAStatus : public impl::ScopedAResource<AStatus*, void, AStatus_delet public: /** * Takes ownership of a. * * WARNING: this constructor is only expected to be used when reading a * status value. Use `ScopedAStatus::ok()` instead. */ explicit ScopedAStatus(AStatus* a = nullptr) : ScopedAResource(a) {} ~ScopedAStatus() {} Loading
libs/binder/ndk/status.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,8 @@ using ::android::status_t; using ::android::binder::Status; AStatus* AStatus_newOk() { return new AStatus(); static AStatus status = AStatus(); return &status; } AStatus* AStatus_fromExceptionCode(binder_exception_t exception) { Loading Loading @@ -78,8 +79,10 @@ void AStatus_deleteDescription(const char* description) { } void AStatus_delete(AStatus* status) { if (status != AStatus_newOk()) { delete status; } } binder_status_t PruneStatusT(status_t status) { switch (status) { Loading