From 74b1ed3231b8cafcf4e5cb3f03d794acd5080004 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 20 Oct 2010 10:22:45 -0700 Subject: [PATCH] Fix issue #3113219: NativeActivity using wrong lib path with Java code Use the same path whether the .apk has dalvik code or not. Change-Id: I66397d7f7e328d5580565ceb17a941afac0e0f8b --- core/java/android/app/NativeActivity.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/core/java/android/app/NativeActivity.java b/core/java/android/app/NativeActivity.java index d7a041243acbd..c98128cbb2551 100644 --- a/core/java/android/app/NativeActivity.java +++ b/core/java/android/app/NativeActivity.java @@ -162,15 +162,10 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, String path = null; - if ((ai.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) == 0) { - // If the application does not have (Java) code, then no ClassLoader - // has been set up for it. We will need to do our own search for - // the native code. - File libraryFile = new File(ai.applicationInfo.nativeLibraryDir, - System.mapLibraryName(libname)); - if (libraryFile.exists()) { - path = libraryFile.getPath(); - } + File libraryFile = new File(ai.applicationInfo.nativeLibraryDir, + System.mapLibraryName(libname)); + if (libraryFile.exists()) { + path = libraryFile.getPath(); } if (path == null) {