summaryrefslogtreecommitdiffstats
path: root/services/core/java/com/android/server/pm/PackageSettingBase.java
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-07-04 18:30:45 +0100
committerNarayan Kamath <narayan@google.com>2014-07-10 17:16:14 +0100
commitff110bd61a69f7ed8602ae14b27f7befec76b2e7 (patch)
tree952fc963ae155edfc6f781611ee3dd1b68d3a071 /services/core/java/com/android/server/pm/PackageSettingBase.java
parent3e9090524a9a2ba686d2c115ee8c65a8d379be12 (diff)
downloadframeworks_base-ff110bd61a69f7ed8602ae14b27f7befec76b2e7.zip
frameworks_base-ff110bd61a69f7ed8602ae14b27f7befec76b2e7.tar.gz
frameworks_base-ff110bd61a69f7ed8602ae14b27f7befec76b2e7.tar.bz2
Multi-arch application installs.
Each application now has two ABIs, the primary and the secondary. The app is always launched with the primary, but the secondary might be used by other apps that load the given applications code. This implies we must: - dex2oat the app both ways. - extract shared libraries for both abis. The former is relatively straightforward but the latter requires us to change the layout for shared libs that we unpack from applications. The bulk of this change deals with the latter. This change continues to fill in nativeLibraryPath during scans for backwards compatibility. This will be removed in a future patch. Change-Id: Ia943dd11ef815c5cbfc60f17929eaa2a652a385a
Diffstat (limited to 'services/core/java/com/android/server/pm/PackageSettingBase.java')
-rw-r--r--services/core/java/com/android/server/pm/PackageSettingBase.java35
1 files changed, 24 insertions, 11 deletions
diff --git a/services/core/java/com/android/server/pm/PackageSettingBase.java b/services/core/java/com/android/server/pm/PackageSettingBase.java
index f263e07..3390efe 100644
--- a/services/core/java/com/android/server/pm/PackageSettingBase.java
+++ b/services/core/java/com/android/server/pm/PackageSettingBase.java
@@ -55,8 +55,16 @@ class PackageSettingBase extends GrantedPermissions {
String codePathString;
File resourcePath;
String resourcePathString;
- String nativeLibraryPathString;
- String cpuAbiString;
+
+ /**
+ * The path under which native libraries for legacy apps are unpacked.
+ * Will be set to {@code null} for newer installs, where the path can be
+ * derived from {@link #codePath} unambiguously.
+ */
+ String legacyNativeLibraryPathString;
+
+ String primaryCpuAbiString;
+ String secondaryCpuAbiString;
long timeStamp;
long firstInstallTime;
long lastUpdateTime;
@@ -84,11 +92,13 @@ class PackageSettingBase extends GrantedPermissions {
/* package name of the app that installed this package */
String installerPackageName;
PackageSettingBase(String name, String realName, File codePath, File resourcePath,
- String nativeLibraryPathString, String cpuAbiString, int pVersionCode, int pkgFlags) {
+ String legacyNativeLibraryPathString, String primaryCpuAbiString,
+ String secondaryCpuAbiString, int pVersionCode, int pkgFlags) {
super(pkgFlags);
this.name = name;
this.realName = realName;
- init(codePath, resourcePath, nativeLibraryPathString, cpuAbiString, pVersionCode);
+ init(codePath, resourcePath, legacyNativeLibraryPathString, primaryCpuAbiString,
+ secondaryCpuAbiString, pVersionCode);
}
/**
@@ -104,8 +114,9 @@ class PackageSettingBase extends GrantedPermissions {
codePathString = base.codePathString;
resourcePath = base.resourcePath;
resourcePathString = base.resourcePathString;
- nativeLibraryPathString = base.nativeLibraryPathString;
- cpuAbiString = base.cpuAbiString;
+ legacyNativeLibraryPathString = base.legacyNativeLibraryPathString;
+ primaryCpuAbiString = base.primaryCpuAbiString;
+ secondaryCpuAbiString = base.secondaryCpuAbiString;
timeStamp = base.timeStamp;
firstInstallTime = base.firstInstallTime;
lastUpdateTime = base.lastUpdateTime;
@@ -132,14 +143,15 @@ class PackageSettingBase extends GrantedPermissions {
}
- void init(File codePath, File resourcePath, String nativeLibraryPathString,
- String requiredCpuAbiString, int pVersionCode) {
+ void init(File codePath, File resourcePath, String legacyNativeLibraryPathString,
+ String primaryCpuAbiString, String secondaryCpuAbiString, int pVersionCode) {
this.codePath = codePath;
this.codePathString = codePath.toString();
this.resourcePath = resourcePath;
this.resourcePathString = resourcePath.toString();
- this.nativeLibraryPathString = nativeLibraryPathString;
- this.cpuAbiString = requiredCpuAbiString;
+ this.legacyNativeLibraryPathString = legacyNativeLibraryPathString;
+ this.primaryCpuAbiString = primaryCpuAbiString;
+ this.secondaryCpuAbiString = secondaryCpuAbiString;
this.versionCode = pVersionCode;
}
@@ -170,7 +182,8 @@ class PackageSettingBase extends GrantedPermissions {
grantedPermissions = base.grantedPermissions;
gids = base.gids;
- cpuAbiString = base.cpuAbiString;
+ primaryCpuAbiString = base.primaryCpuAbiString;
+ secondaryCpuAbiString = base.secondaryCpuAbiString;
timeStamp = base.timeStamp;
firstInstallTime = base.firstInstallTime;
lastUpdateTime = base.lastUpdateTime;