Merge "Only spawn one binder thread for screencap." into oc-dev

This commit is contained in:
Martijn Coenen
2017-05-11 22:07:31 +00:00
committed by Android (Google) Code Review

View File

@@ -84,6 +84,11 @@ static status_t notifyMediaScanner(const char* fileName) {
int main(int argc, char** argv)
{
// setThreadPoolMaxThreadCount(0) actually tells the kernel it's
// not allowed to spawn any additional threads, but we still spawn
// a binder thread from userspace when we call startThreadPool().
// See b/36066697 for rationale
ProcessState::self()->setThreadPoolMaxThreadCount(0);
ProcessState::self()->startThreadPool();
const char* pname = argv[0];