Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f17bd19a authored by Kenny Root's avatar Kenny Root Committed by Android Git Automerger
Browse files

am 2cb3e836: Merge "Use new nativeLibraryPath field for NativeActivity" into gingerbread

Merge commit '2cb3e836' into gingerbread-plus-aosp

* commit '2cb3e836':
  Use new nativeLibraryPath field for NativeActivity
parents b6432ca4 2cb3e836
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -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,14 +166,11 @@ 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) {