diff options
author | Brian Carlstrom <bdc@google.com> | 2014-05-29 19:43:02 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-29 19:43:02 +0000 |
commit | 823bcce3abf536ee130a50551130d10589547cf4 (patch) | |
tree | d93137f212cbbffd51e31755a0da2d23a97e0f55 /services/surfaceflinger/DdmConnection.cpp | |
parent | ad8d25e812d8842298de92657158a0325c42cdbd (diff) | |
parent | 4ae6a26719feb21b7fa1cc5f307b591858a30f26 (diff) | |
download | frameworks_native-823bcce3abf536ee130a50551130d10589547cf4.zip frameworks_native-823bcce3abf536ee130a50551130d10589547cf4.tar.gz frameworks_native-823bcce3abf536ee130a50551130d10589547cf4.tar.bz2 |
am 4ae6a267: am f3e4fda0: Merge "Remove dependencies on runtime_libdvm and libdvm.so in general"
* commit '4ae6a26719feb21b7fa1cc5f307b591858a30f26':
Remove dependencies on runtime_libdvm and libdvm.so in general
Diffstat (limited to 'services/surfaceflinger/DdmConnection.cpp')
-rw-r--r-- | services/surfaceflinger/DdmConnection.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/services/surfaceflinger/DdmConnection.cpp b/services/surfaceflinger/DdmConnection.cpp index d2c977d..2477921 100644 --- a/services/surfaceflinger/DdmConnection.cpp +++ b/services/surfaceflinger/DdmConnection.cpp @@ -45,18 +45,21 @@ void DdmConnection::start(const char* name) { args.ignoreUnrecognized = JNI_FALSE; - void* libdvm_dso = dlopen("libdvm.so", RTLD_NOW); - ALOGE_IF(!libdvm_dso, "DdmConnection: %s", dlerror()); + // TODO: Should this just link against libnativehelper and use its + // JNI_CreateJavaVM wrapper that essential does this dlopen/dlsym + // work based on the current system default runtime? + void* libart_dso = dlopen("libart.so", RTLD_NOW); + ALOGE_IF(!libart_dso, "DdmConnection: %s", dlerror()); void* libandroid_runtime_dso = dlopen("libandroid_runtime.so", RTLD_NOW); ALOGE_IF(!libandroid_runtime_dso, "DdmConnection: %s", dlerror()); - if (!libdvm_dso || !libandroid_runtime_dso) { + if (!libart_dso || !libandroid_runtime_dso) { goto error; } jint (*JNI_CreateJavaVM)(JavaVM** p_vm, JNIEnv** p_env, void* vm_args); - JNI_CreateJavaVM = (typeof JNI_CreateJavaVM)dlsym(libdvm_dso, "JNI_CreateJavaVM"); + JNI_CreateJavaVM = (typeof JNI_CreateJavaVM)dlsym(libart_dso, "JNI_CreateJavaVM"); ALOGE_IF(!JNI_CreateJavaVM, "DdmConnection: %s", dlerror()); jint (*registerNatives)(JNIEnv* env, jclass clazz); @@ -104,8 +107,8 @@ error: if (libandroid_runtime_dso) { dlclose(libandroid_runtime_dso); } - if (libdvm_dso) { - dlclose(libdvm_dso); + if (libart_dso) { + dlclose(libart_dso); } } |