summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2014-07-11 01:39:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-10 20:30:05 +0000
commit355319f7820a53195f905ef162d67c18cf8c8afa (patch)
treec63034fae502fece6eab18c93e542299543b9869 /core/java
parentf6f604adef2c0a17771984477dd3614a33b72c22 (diff)
parent84f1294a958b42000755dc6570e3eda72ab42140 (diff)
Merge "Always derive native library paths at runtime."
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java32
-rw-r--r--core/java/android/content/pm/PackageParser.java2
2 files changed, 21 insertions, 13 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 4939fb653301..b93bbe0cf76e 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -491,18 +491,23 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public String nativeLibraryDir;
/**
- * The path under the apps data directory we store unpacked libraries. For
- * new installs, we create subdirectories under legacyNativeLibraryDir that are
- * architecture specific. For legacy installs, the shared libraries are
- * placed directly under this path.
+ * The root path where unpacked native libraries are stored.
+ * <p>
+ * When {@link #nativeLibraryRootRequiresIsa} is set, the libraries are
+ * placed in ISA-specific subdirectories under this path, otherwise the
+ * libraries are placed directly at this path.
*
- * For "legacy" installs {@code nativeLibraryDir} will be equal to this path.
- * For newer installs, it will be derived based on the codePath and the primary
- * cpu abi.
+ * @hide
+ */
+ public String nativeLibraryRootDir;
+
+ /**
+ * Flag indicating that ISA must be appended to
+ * {@link #nativeLibraryRootDir} to be useful.
*
- * @hide.
+ * @hide
*/
- public String legacyNativeLibraryDir;
+ public boolean nativeLibraryRootRequiresIsa;
/**
* The primary ABI that this application requires, This is inferred from the ABIs
@@ -683,7 +688,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
splitSourceDirs = orig.splitSourceDirs;
splitPublicSourceDirs = orig.splitPublicSourceDirs;
nativeLibraryDir = orig.nativeLibraryDir;
- legacyNativeLibraryDir = orig.legacyNativeLibraryDir;
+ nativeLibraryRootDir = orig.nativeLibraryRootDir;
+ nativeLibraryRootRequiresIsa = orig.nativeLibraryRootRequiresIsa;
primaryCpuAbi = orig.primaryCpuAbi;
secondaryCpuAbi = orig.secondaryCpuAbi;
apkRoot = orig.apkRoot;
@@ -730,7 +736,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
dest.writeStringArray(splitSourceDirs);
dest.writeStringArray(splitPublicSourceDirs);
dest.writeString(nativeLibraryDir);
- dest.writeString(legacyNativeLibraryDir);
+ dest.writeString(nativeLibraryRootDir);
+ dest.writeInt(nativeLibraryRootRequiresIsa ? 1 : 0);
dest.writeString(primaryCpuAbi);
dest.writeString(secondaryCpuAbi);
dest.writeString(apkRoot);
@@ -776,7 +783,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
splitSourceDirs = source.readStringArray();
splitPublicSourceDirs = source.readStringArray();
nativeLibraryDir = source.readString();
- legacyNativeLibraryDir = source.readString();
+ nativeLibraryRootDir = source.readString();
+ nativeLibraryRootRequiresIsa = source.readInt() != 0;
primaryCpuAbi = source.readString();
secondaryCpuAbi = source.readString();
apkRoot = source.readString();
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index b5da4cd03780..0b6a92665d11 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -333,7 +333,7 @@ public class PackageParser {
}
public static final boolean isApkFile(File file) {
- return file.isFile() && file.getName().endsWith(".apk");
+ return file.getName().endsWith(".apk");
}
/*