diff options
| author | Dimitry Ivanov <dimitry@google.com> | 2016-02-23 14:23:51 -0800 |
|---|---|---|
| committer | Dimitry Ivanov <dimitry@google.com> | 2016-02-25 11:33:32 -0800 |
| commit | d047c925af62e1fe28fcd1c1940df4afe18d458a (patch) | |
| tree | 8fb2ac4e56eed5f78641efba6f00506156a74687 /libnativeloader/include/nativeloader | |
| parent | b046e74beff221d96189c4142f42f18730565921 (diff) | |
| download | system_core-d047c925af62e1fe28fcd1c1940df4afe18d458a.tar.gz system_core-d047c925af62e1fe28fcd1c1940df4afe18d458a.tar.bz2 system_core-d047c925af62e1fe28fcd1c1940df4afe18d458a.zip | |
Added function to explicitly initialize a namespace
This change replaces lazy get-or-create logic for
linker namespaces with the explicit one.
ApplicationLoaders.getClassLoader(..) is now resposible for
the namespace initialization for PathClassLoaders.
Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: Ife987c3ca1db33a47c20f363a5ed61512be8b5a7
Diffstat (limited to 'libnativeloader/include/nativeloader')
| -rw-r--r-- | libnativeloader/include/nativeloader/native_loader.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/libnativeloader/include/nativeloader/native_loader.h b/libnativeloader/include/nativeloader/native_loader.h index 5644aa637..b16c0e66e 100644 --- a/libnativeloader/include/nativeloader/native_loader.h +++ b/libnativeloader/include/nativeloader/native_loader.h @@ -29,9 +29,19 @@ __attribute__((visibility("default"))) void PreloadPublicNativeLibraries(); __attribute__((visibility("default"))) -void* OpenNativeLibrary(JNIEnv* env, int32_t target_sdk_version, const char* path, - jobject class_loader, bool is_shared, jstring library_path, - jstring permitted_path); +jstring CreateClassLoaderNamespace(JNIEnv* env, + int32_t target_sdk_version, + jobject class_loader, + bool is_shared, + jstring library_path, + jstring permitted_path); + +__attribute__((visibility("default"))) +void* OpenNativeLibrary(JNIEnv* env, + int32_t target_sdk_version, + const char* path, + jobject class_loader, + jstring library_path); #if defined(__ANDROID__) // Look up linker namespace by class_loader. Returns nullptr if |
