diff options
author | Dan Egnor <egnor@google.com> | 2010-05-06 00:55:09 -0700 |
---|---|---|
committer | Dan Egnor <egnor@google.com> | 2010-05-06 01:03:31 -0700 |
commit | 87957f7b91fbf83dbb417e5f0bab9ee54818fdd0 (patch) | |
tree | cc7c031ba397cf69e20da749c5877569d04e1a5c /Binder.cpp | |
parent | 380cf5dbf2dec61134f60064c971d262d5208321 (diff) | |
download | libhwbinder-87957f7b91fbf83dbb417e5f0bab9ee54818fdd0.tar.gz |
Make static versions of libutils and libbinder.
Fix some small static-initialization-order issues (and a static-
initializers-missing issue) that result from doing so. The static
libraries don't actually get used for anything real at the moment --
they're used for perf tests of bug 2660235.
Bug: 2660235
Change-Id: Iee2f38f79cc93b395e8d0a5a144ed92461f5ada0
Diffstat (limited to 'Binder.cpp')
-rw-r--r-- | Binder.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -69,8 +69,6 @@ public: // --------------------------------------------------------------------------- -String16 BBinder::sEmptyDescriptor; - BBinder::BBinder() : mExtras(NULL) { @@ -88,6 +86,9 @@ status_t BBinder::pingBinder() const String16& BBinder::getInterfaceDescriptor() const { + // This is a local static rather than a global static, + // to avoid static initializer ordering issues. + static String16 sEmptyDescriptor; LOGW("reached BBinder::getInterfaceDescriptor (this=%p)", this); return sEmptyDescriptor; } |