Loading libs/binder/IServiceManager.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -412,13 +412,11 @@ 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, 1s, [&] { return waiter->mBinder != nullptr; }); waiter->mCv.wait_for(lock, 2s, [&] { return waiter->mBinder != nullptr; }); if (waiter->mBinder != nullptr) return waiter->mBinder; } ALOGW("Waited one second for %s (is service started? Number of threads started in the " ALOGW("Waited two seconds 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()); Loading Loading
libs/binder/IServiceManager.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -412,13 +412,11 @@ 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, 1s, [&] { return waiter->mBinder != nullptr; }); waiter->mCv.wait_for(lock, 2s, [&] { return waiter->mBinder != nullptr; }); if (waiter->mBinder != nullptr) return waiter->mBinder; } ALOGW("Waited one second for %s (is service started? Number of threads started in the " ALOGW("Waited two seconds 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()); Loading