Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80ddb8f5 authored by Dimitry Ivanov's avatar Dimitry Ivanov
Browse files

Check if public namespace has already been initialized

There is no point in reading/loading the list of public
libraries once public namespace is already initialized.

Change-Id: I5a53c46bb57b8de241ba521a6321c12e94a76476
parent 179fea40
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -105,6 +105,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";