diff options
author | Kenny Root <kroot@google.com> | 2010-09-07 10:46:14 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-09-07 10:46:14 -0700 |
commit | 2cb3e83654c99e202c170d9d0237d8d1f4054354 (patch) | |
tree | 1580653f519caba25fe152631e21d8fe6647aa2f /core | |
parent | 960b31e3b3b40f92665be4b7a79da7f05ea19751 (diff) | |
parent | 6798b62e9230b744d877c4fcab2a0d949eab9f8f (diff) | |
download | frameworks_base-2cb3e83654c99e202c170d9d0237d8d1f4054354.zip frameworks_base-2cb3e83654c99e202c170d9d0237d8d1f4054354.tar.gz frameworks_base-2cb3e83654c99e202c170d9d0237d8d1f4054354.tar.bz2 |
Merge "Use new nativeLibraryPath field for NativeActivity" into gingerbread
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/NativeActivity.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/core/java/android/app/NativeActivity.java b/core/java/android/app/NativeActivity.java index 4dc88b3..d7a0412 100644 --- a/core/java/android/app/NativeActivity.java +++ b/core/java/android/app/NativeActivity.java @@ -3,8 +3,6 @@ package android.app; import com.android.internal.view.IInputMethodCallback; import com.android.internal.view.IInputMethodSession; -import dalvik.system.PathClassLoader; - import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; @@ -168,17 +166,14 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2, // 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. - path = ai.applicationInfo.dataDir + "/lib/" + System.mapLibraryName(libname); - if (!(new File(path)).exists()) { - path = null; + File libraryFile = new File(ai.applicationInfo.nativeLibraryDir, + System.mapLibraryName(libname)); + if (libraryFile.exists()) { + path = libraryFile.getPath(); } } if (path == null) { - path = ((PathClassLoader)getClassLoader()).findLibrary(libname); - } - - if (path == null) { throw new IllegalArgumentException("Unable to find native library: " + libname); } |