OSDN Git Service

binder: Fix service initialization race vs. service manager
authorAndy Ross <andy.ross@windriver.com>
Tue, 19 Feb 2013 22:39:34 +0000 (14:39 -0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 9 Dec 2013 14:29:08 +0000 (22:29 +0800)
commit66bc14af5c7c3e62a0295d93eb852f1946c267c6
tree8bfab61fd058351d9be17903ef09e1f36c76fd45
parentfd461118b7a8112bddf1bb8a7dd6e94c86d8f96b
binder: Fix service initialization race vs. service manager

The framework relies on the global IServiceManager running before a
BinderService object is instantiated.  But there was no detection of
the error condition when it was not (specifically: mediaserver can be
initialized before system_server), and in fact the default error
behavior (kill the proxy object) ensured that the process would never
be able to add services again.  Retry the addService() code, and allow
transient binder failures for the special case of the service manager
proxy.

Issue: AXIA-1706
Change-Id: Icac10bb0f47a2fe33ac9605a13633b83afa3ebff
Signed-off-by: Andy Ross <andy.ross@windriver.com>
libs/binder/BpBinder.cpp
libs/binder/IServiceManager.cpp