diff options
| author | 2021-10-12 03:42:55 +0000 | |
|---|---|---|
| committer | 2021-10-12 03:42:55 +0000 | |
| commit | ee4e817a980095fbb3ff21a32ab4d3a50d5d0e88 (patch) | |
| tree | 6f8f08f2d878d89860f0e0b7fdd0232f2a145af1 /libs/binder/ServiceManagerHost.cpp | |
| parent | 2c62f367eb237e88bc0afe71a533595e90e39c2c (diff) | |
| parent | 86cf053ec0e9df426f2ab52f1fb037963697e8f7 (diff) | |
Merge changes I71b563ca,Ib51fa419,I15686bae
* changes:
Compile the utility `service` on host as `aservice`
binder: host service manager limits max outgoing threads
binder: RpcSession limit outgoing threads
Diffstat (limited to 'libs/binder/ServiceManagerHost.cpp')
| -rw-r--r-- | libs/binder/ServiceManagerHost.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/binder/ServiceManagerHost.cpp b/libs/binder/ServiceManagerHost.cpp index 27cc563adc..194254ac69 100644 --- a/libs/binder/ServiceManagerHost.cpp +++ b/libs/binder/ServiceManagerHost.cpp @@ -124,7 +124,8 @@ void cleanupCommandResult(const void* id, void* obj, void* /* cookie */) { } // namespace -sp<IBinder> getDeviceService(std::vector<std::string>&& serviceDispatcherArgs) { +sp<IBinder> getDeviceService(std::vector<std::string>&& serviceDispatcherArgs, + const RpcDelegateServiceManagerOptions& options) { std::vector<std::string> prefix{"adb", "shell", "servicedispatcher"}; serviceDispatcherArgs.insert(serviceDispatcherArgs.begin(), prefix.begin(), prefix.end()); @@ -158,6 +159,10 @@ sp<IBinder> getDeviceService(std::vector<std::string>&& serviceDispatcherArgs) { LOG_ALWAYS_FATAL_IF(!forwardResult->hostPort().has_value()); auto rpcSession = RpcSession::make(); + if (options.maxOutgoingThreads.has_value()) { + rpcSession->setMaxOutgoingThreads(*options.maxOutgoingThreads); + } + if (status_t status = rpcSession->setupInetClient("127.0.0.1", *forwardResult->hostPort()); status != OK) { ALOGE("Unable to set up inet client on host port %u: %s", *forwardResult->hostPort(), |