rpc_binder: Mark ARpcServer_shutdown [[nodiscard]]
The function can fail. Propagate the return value from C++ to both C and
Rust wrappers.
Bug: 245727626
Test: builds
Change-Id: Idf6e6d9002119173d76fe25f73856a0768bb46a1
diff --git a/libs/binder/libbinder_rpc_unstable.cpp b/libs/binder/libbinder_rpc_unstable.cpp
index 8886f7d..89ef46d 100644
--- a/libs/binder/libbinder_rpc_unstable.cpp
+++ b/libs/binder/libbinder_rpc_unstable.cpp
@@ -157,8 +157,8 @@
handleToStrongPointer<RpcServer>(handle)->join();
}
-void ARpcServer_shutdown(ARpcServer* handle) {
- handleToStrongPointer<RpcServer>(handle)->shutdown();
+bool ARpcServer_shutdown(ARpcServer* handle) {
+ return handleToStrongPointer<RpcServer>(handle)->shutdown();
}
void ARpcServer_free(ARpcServer* handle) {