summaryrefslogtreecommitdiff
path: root/libs/binder/RpcServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/RpcServer.cpp')
-rw-r--r--libs/binder/RpcServer.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp
index 0ee5f05030..e581d0b16c 100644
--- a/libs/binder/RpcServer.cpp
+++ b/libs/binder/RpcServer.cpp
@@ -560,4 +560,14 @@ status_t RpcServer::setupExternalServer(base::unique_fd serverFd) {
return OK;
}
+bool RpcServer::hasActiveRequests() {
+ RpcMutexLockGuard _l(mLock);
+ for (const auto& [_, session] : mSessions) {
+ if (session->hasActiveRequests()) {
+ return true;
+ }
+ }
+ return !mServer.isInPollingState();
+}
+
} // namespace android