summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/runtime.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index eb5455a4cd..9f7fabad40 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -25,6 +25,7 @@
#define ATRACE_TAG ATRACE_TAG_DALVIK
#include <cutils/trace.h>
+#include <nativeloader/native_loader.h>
#include <signal.h>
#include <sys/syscall.h>
#include "base/memory_tool.h"
@@ -551,6 +552,11 @@ bool Runtime::Start() {
}
#endif
+ // This line makes sure that all public native libraries
+ // are loaded prior to runtime start; saves app load times
+ // and memory.
+ android::PreloadPublicNativeLibraries();
+
// Restore main thread state to kNative as expected by native code.
Thread* self = Thread::Current();