Merge "Check if public namespace has already been initialized" am: 0756fae4f1

am: 5cd1e6822a

* commit '5cd1e6822abd016e5ee6e642528b39acaf15ae55':
  Check if public namespace has already been initialized

Change-Id: I13740764783765256af2fb1672fbfc5592147760
This commit is contained in:
Dimitry Ivanov 2016-05-11 01:30:32 +00:00 committed by android-build-merger
commit ddc6a4a0a6

View file

@ -119,6 +119,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";