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>
Sun, 10 Dec 2017 15:10:37 +0000 (23:10 +0800)
commit0b0e3bf00a74c34e949904e5a4680b5ade366815
tree7f6411c6b99aee93309e78b62ba5a1734ee59f67
parent4e325e5d6e53c018b39adade443c56894aef1f40
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