summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2023-04-25 18:25:14 +0000
committer Steven Moreland <smoreland@google.com> 2023-04-25 18:25:26 +0000
commit3d37ef29628ef7e24d0fa1e1b494f87d9cfc8458 (patch)
tree564e488303ef10718a7050e61b0b27d617a8cf91 /libs
parent2839c45cf9c29c11c588e5fdc868c00922f2ae6e (diff)
Revert "libbinder: double cost for incorrect wait config"
This reverts commit 2839c45cf9c29c11c588e5fdc868c00922f2ae6e. Reason for revert: no clear path forward for some wakelock users Fixes: 279514466 Change-Id: I93884340ea224fe71aa05b1e30bd2f1b538f8804
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/IServiceManager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index d4ef0b73a1..2408307459 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -412,11 +412,13 @@ sp<IBinder> ServiceManagerShim::waitForService(const String16& name16)
// command, so we hang indefinitely.
std::unique_lock<std::mutex> lock(waiter->mMutex);
using std::literals::chrono_literals::operator""s;
- waiter->mCv.wait_for(lock, 2s, [&] { return waiter->mBinder != nullptr; });
+ waiter->mCv.wait_for(lock, 1s, [&] {
+ return waiter->mBinder != nullptr;
+ });
if (waiter->mBinder != nullptr) return waiter->mBinder;
}
- ALOGW("Waited two seconds for %s (is service started? Number of threads started in the "
+ ALOGW("Waited one second for %s (is service started? Number of threads started in the "
"threadpool: %zu. Are binder threads started and available?)",
name.c_str(), ProcessState::self()->getThreadPoolMaxTotalThreadCount());