Init: error on oneway calls.

Before, this process had no threadpool, so it could make blocking
calls, but if it did, they would block forever. Now when this
happens, an error is logged so that we can easily see this happen.

Bug: 36424585
Test: boot
Change-Id: I7d2fa12b6d5a243bdde13ce4d974a444133749f7
This commit is contained in:
Steven Moreland 2019-01-11 14:39:45 -08:00
parent 2f171cc69e
commit dc1f24777a

View file

@ -451,6 +451,8 @@ static Result<Success> InitBinder(const BuiltinArguments& args) {
// Also, binder can't be used by recovery.
#ifndef RECOVERY
android::ProcessState::self()->setThreadPoolMaxThreadCount(0);
android::ProcessState::self()->setCallRestriction(
ProcessState::CallRestriction::ERROR_IF_NOT_ONEWAY);
#endif
return Success();
}