Merge "Flush commands to binder driver."
am: 0044c9a760
Change-Id: I398e5e38c3c6fc7b80041186562b2b1533e149e0
diff --git a/service.cpp b/service.cpp
index b72205e..9c501be 100644
--- a/service.cpp
+++ b/service.cpp
@@ -80,6 +80,9 @@
ALOGE("Failed to aquire binder FD. Aborting...");
return -1;
}
+ // Flush after setupPolling(), to make sure the binder driver
+ // knows about this thread handling commands.
+ IPCThreadState::self()->flushCommands();
sp<BinderCallback> cb(new BinderCallback);
if (looper->addFd(binder_fd, Looper::POLL_CALLBACK, Looper::EVENT_INPUT, cb,