| Index: base/android/java/src/org/chromium/base/PathUtils.java
|
| diff --git a/base/android/java/src/org/chromium/base/PathUtils.java b/base/android/java/src/org/chromium/base/PathUtils.java
|
| index 94403d4df3ae42fdeafaac010ef1be846d8f8423..8ae3bae168f3d232405c96a0140cf11aeab37c6f 100644
|
| --- a/base/android/java/src/org/chromium/base/PathUtils.java
|
| +++ b/base/android/java/src/org/chromium/base/PathUtils.java
|
| @@ -5,6 +5,7 @@
|
| package org.chromium.base;
|
|
|
| import android.content.Context;
|
| +import android.content.pm.ApplicationInfo;
|
| import android.os.Environment;
|
|
|
| import org.chromium.base.CalledByNative;
|
| @@ -41,4 +42,18 @@ class PathUtils {
|
| return Environment.getExternalStoragePublicDirectory(
|
| Environment.DIRECTORY_DOWNLOADS).getPath();
|
| }
|
| +
|
| + /**
|
| + * @return the path to native libraries.
|
| + */
|
| + @CalledByNative
|
| + public static String getNativeLibraryDirectory(Context appContext) {
|
| + ApplicationInfo ai = appContext.getApplicationInfo();
|
| + if ((ai.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0 ||
|
| + (ai.flags & ApplicationInfo.FLAG_SYSTEM) == 0) {
|
| + return ai.nativeLibraryDir;
|
| + }
|
| +
|
| + return "/system/lib/";
|
| + }
|
| }
|
|
|