Loading core/jni/android_app_ApplicationLoaders.cpp +11 −2 Original line number Original line Diff line number Diff line Loading @@ -14,6 +14,8 @@ * limitations under the License. * limitations under the License. */ */ #define LOG_TAG "ApplicationLoaders" #include <nativehelper/ScopedUtfChars.h> #include <nativehelper/ScopedUtfChars.h> #include <nativeloader/native_loader.h> #include <nativeloader/native_loader.h> #include <vulkan/vulkan_loader_data.h> #include <vulkan/vulkan_loader_data.h> Loading @@ -22,10 +24,17 @@ static void setupVulkanLayerPath_native(JNIEnv* env, jobject clazz, static void setupVulkanLayerPath_native(JNIEnv* env, jobject clazz, jobject classLoader, jstring librarySearchPath) { jobject classLoader, jstring librarySearchPath) { android_namespace_t* ns = android::FindNamespaceByClassLoader(env, classLoader); ScopedUtfChars layerPathChars(env, librarySearchPath); ScopedUtfChars layerPathChars(env, librarySearchPath); vulkan::LoaderData& loader_data = vulkan::LoaderData::GetInstance(); vulkan::LoaderData& loader_data = vulkan::LoaderData::GetInstance(); if (loader_data.layer_path.empty()) { loader_data.layer_path = layerPathChars.c_str(); loader_data.layer_path = layerPathChars.c_str(); loader_data.app_namespace = android::FindNamespaceByClassLoader(env, classLoader); loader_data.app_namespace = ns; } else { ALOGD("ignored Vulkan layer search path %s for namespace %p", layerPathChars.c_str(), ns); } } } static const JNINativeMethod g_methods[] = { static const JNINativeMethod g_methods[] = { Loading Loading
core/jni/android_app_ApplicationLoaders.cpp +11 −2 Original line number Original line Diff line number Diff line Loading @@ -14,6 +14,8 @@ * limitations under the License. * limitations under the License. */ */ #define LOG_TAG "ApplicationLoaders" #include <nativehelper/ScopedUtfChars.h> #include <nativehelper/ScopedUtfChars.h> #include <nativeloader/native_loader.h> #include <nativeloader/native_loader.h> #include <vulkan/vulkan_loader_data.h> #include <vulkan/vulkan_loader_data.h> Loading @@ -22,10 +24,17 @@ static void setupVulkanLayerPath_native(JNIEnv* env, jobject clazz, static void setupVulkanLayerPath_native(JNIEnv* env, jobject clazz, jobject classLoader, jstring librarySearchPath) { jobject classLoader, jstring librarySearchPath) { android_namespace_t* ns = android::FindNamespaceByClassLoader(env, classLoader); ScopedUtfChars layerPathChars(env, librarySearchPath); ScopedUtfChars layerPathChars(env, librarySearchPath); vulkan::LoaderData& loader_data = vulkan::LoaderData::GetInstance(); vulkan::LoaderData& loader_data = vulkan::LoaderData::GetInstance(); if (loader_data.layer_path.empty()) { loader_data.layer_path = layerPathChars.c_str(); loader_data.layer_path = layerPathChars.c_str(); loader_data.app_namespace = android::FindNamespaceByClassLoader(env, classLoader); loader_data.app_namespace = ns; } else { ALOGD("ignored Vulkan layer search path %s for namespace %p", layerPathChars.c_str(), ns); } } } static const JNINativeMethod g_methods[] = { static const JNINativeMethod g_methods[] = { Loading