diff options
| author | 2016-05-03 20:00:37 +0000 | |
|---|---|---|
| committer | 2016-05-03 20:00:39 +0000 | |
| commit | a31657911c96fb735bf4a34610638c9f95e5c99d (patch) | |
| tree | b97cb259302c0cc462b9dce20c1830e8a6c1247e | |
| parent | 95aa2fc3234f0c842cf9a2b0de44e2f093dcb5d5 (diff) | |
| parent | bf3b5f7a18b128c0d8b19a3bcbf12e7759bb12f8 (diff) | |
Merge "Allow apps to load libraries from under /data" into nyc-dev
| -rw-r--r-- | core/java/android/app/LoadedApk.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index bb2cc95fbec2..e60712aaf359 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -465,20 +465,18 @@ public final class LoadedApk { final String zip = mIncludeCode ? TextUtils.join(File.pathSeparator, zipPaths) : ""; final boolean isBundledApp = mApplicationInfo.isSystemApp() && !mApplicationInfo.isUpdatedSystemApp(); - String libraryPermittedPath = mDataDir; + + // Apps are allowed to open any native library under /data + // TODO (dimitry):This is something which could be limited to apps own directory + // later on but currently there are number of apps relying on this. + // (see http://b/27588281 and http://b/26954419 for examples) + String libraryPermittedPath = "/data"; if (isBundledApp) { // This is necessary to grant bundled apps access to // libraries located in subdirectories of /system/lib libraryPermittedPath += File.pathSeparator + System.getProperty("java.library.path"); } - // DO NOT SHIP: this is a workaround for apps loading native libraries - // provided by 3rd party apps using absolute path instead of corresponding - // classloader; see http://b/26954419 for example. - if (mApplicationInfo.targetSdkVersion <= 23) { - libraryPermittedPath += File.pathSeparator + "/data/app"; - } - // ----------------------------------------------------------------------------- final String librarySearchPath = TextUtils.join(File.pathSeparator, libPaths); |