Merge "~RpcServer() calls shutdown explicitly." am: de10257e6a am: 4a0fad36e1 am: e028e46dfe

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1712596

Change-Id: I775b03336a33d7c84c48335aa78aaac0cd4ed044
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp
index e31aea0..63d4dde 100644
--- a/libs/binder/RpcServer.cpp
+++ b/libs/binder/RpcServer.cpp
@@ -39,7 +39,9 @@
 using base::unique_fd;
 
 RpcServer::RpcServer() {}
-RpcServer::~RpcServer() {}
+RpcServer::~RpcServer() {
+    (void)shutdown();
+}
 
 sp<RpcServer> RpcServer::make() {
     return sp<RpcServer>::make();
@@ -204,7 +206,6 @@
 }
 
 bool RpcServer::shutdown() {
-    LOG_ALWAYS_FATAL_IF(!mAgreedExperimental, "no!");
     std::unique_lock<std::mutex> _l(mLock);
     if (mShutdownTrigger == nullptr) return false;