diff options
author | Dimitry Ivanov <dimitry@google.com> | 2016-05-11 01:23:19 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-05-11 01:23:20 +0000 |
commit | 0756fae4f1aea5072ed820087b2487b408194c38 (patch) | |
tree | 2d2bc04190d65867b5fa897df68878f8c053d996 /libnativeloader | |
parent | 3fb5f1380671b6b9d3b511fc2b80051a14313dec (diff) | |
parent | 80ddb8f5517b4632307705858c3402081583a456 (diff) | |
download | system_core-0756fae4f1aea5072ed820087b2487b408194c38.tar.gz system_core-0756fae4f1aea5072ed820087b2487b408194c38.tar.bz2 system_core-0756fae4f1aea5072ed820087b2487b408194c38.zip |
Merge "Check if public namespace has already been initialized"
Diffstat (limited to 'libnativeloader')
-rw-r--r-- | libnativeloader/native_loader.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp index a2cbe1913..dca316c56 100644 --- a/libnativeloader/native_loader.cpp +++ b/libnativeloader/native_loader.cpp @@ -117,6 +117,13 @@ class LibraryNamespaces { } void Initialize() { + // Once public namespace is initialized there is no + // point in running this code - it will have no effect + // on the current list of public libraries. + if (initialized_) { + return; + } + std::vector<std::string> sonames; const char* android_root_env = getenv("ANDROID_ROOT"); std::string root_dir = android_root_env != nullptr ? android_root_env : "/system"; |