libbinder: RpcSession exposes sp<RpcServer>
This object guarantees a strong pointer IFF it is associated with a
server. The wp<> return type here previously was for convenience (idk?)
but users of it shouldn't be concerned with the underlying memory
situation.
Bug: 167966510
Test: binderRpcTest
Change-Id: I6578c3a4246e1bd07f7697c11d4b56899b50245b
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp
index 8dd6daf..9676109 100644
--- a/libs/binder/RpcState.cpp
+++ b/libs/binder/RpcState.cpp
@@ -741,7 +741,7 @@
break;
}
default: {
- sp<RpcServer> server = session->server().promote();
+ sp<RpcServer> server = session->server();
if (server) {
switch (transaction->code) {
case RPC_SPECIAL_TRANSACT_GET_ROOT: {