Merge "Fix bug where credstore is immediately exiting."
diff --git a/identity/main.cpp b/identity/main.cpp
index 08f2219..9add73c 100644
--- a/identity/main.cpp
+++ b/identity/main.cpp
@@ -53,5 +53,9 @@
     CHECK(ret == ::android::OK) << "Couldn't register binder service";
     LOG(ERROR) << "Registered binder service";
 
+    // Credstore is a single-threaded process. So devote the main thread
+    // to handling binder messages.
+    IPCThreadState::self()->joinThreadPool();
+
     return 0;
 }