Use main thread for Binder transactions.
Make the main thread do something useful instead of sitting around
twiddling its thumbs.
Test: builds, boots
Bug: 67041047
Change-Id: I88f7f4fe151ae2b81f80aa575530c12b56ba4d75
diff --git a/main.cpp b/main.cpp
index cca738e..01a2168 100644
--- a/main.cpp
+++ b/main.cpp
@@ -130,12 +130,9 @@
ATRACE_END();
- // Eventually we'll become the monitoring thread
- while(1) {
- pause();
- }
+ android::IPCThreadState::self()->joinThreadPool();
+ LOG(INFO) << "vold shutting down";
- LOG(ERROR) << "Vold exiting";
exit(0);
}