summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Yifan Hong <elsk@google.com> 2021-05-21 23:26:45 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-05-21 23:26:45 +0000
commitf3d855fd159e3b9b1e3978704e50720f1645b34f (patch)
treef2fd4754475d44d240d32d19701177fb2784b97d /libs/binder/ProcessState.cpp
parent6a8f437e8c7354c5eeced8b285ec7ae3d934b18b (diff)
parentf15d42920e535b8e52e30c3828f920156c4bdca6 (diff)
Merge "Add IBinder::setRpcClient" am: a0b682cc2d am: f15d42920e
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1683951 Change-Id: Id7711d30da985e5911215727f34a47bb2d61b9a5
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r--libs/binder/ProcessState.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index 4fd0dc7715..179a9d2068 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -359,6 +359,14 @@ status_t ProcessState::setThreadPoolMaxThreadCount(size_t maxThreads) {
return result;
}
+size_t ProcessState::getThreadPoolMaxThreadCount() const {
+ // may actually be one more than this, if join is called
+ if (mThreadPoolStarted) return mMaxThreads;
+ // must not be initialized or maybe has poll thread setup, we
+ // currently don't track this in libbinder
+ return 0;
+}
+
status_t ProcessState::enableOnewaySpamDetection(bool enable) {
uint32_t enableDetection = enable ? 1 : 0;
if (ioctl(mDriverFD, BINDER_ENABLE_ONEWAY_SPAM_DETECTION, &enableDetection) == -1) {