diff options
author | Jeff Sharkey <jsharkey@android.com> | 2014-07-17 18:08:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-07-17 18:05:14 +0000 |
commit | 69eef8a0d250ae1b50b510499014e109bd2c6112 (patch) | |
tree | cb6c806045771d58fed7f2360c16b064517b73b5 /services | |
parent | f8cf71d753b86895f987f682c80491aa2967e0c2 (diff) | |
parent | 1e9189a276e967a7a74ff44a44cf627764396954 (diff) | |
download | frameworks_base-69eef8a0d250ae1b50b510499014e109bd2c6112.zip frameworks_base-69eef8a0d250ae1b50b510499014e109bd2c6112.tar.gz frameworks_base-69eef8a0d250ae1b50b510499014e109bd2c6112.tar.bz2 |
Merge "Support cluster-style installs for bundled apps." into lmp-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 727cff0..a70dd1b 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -6231,31 +6231,26 @@ public class PackageManagerService extends IPackageManager.Stub { info.nativeLibraryDir = null; info.secondaryNativeLibraryDir = null; - if (bundledApp) { - // Monolithic bundled install - // TODO: support cluster bundled installs? - - final boolean is64Bit = (info.primaryCpuAbi != null) - && VMRuntime.is64BitAbi(info.primaryCpuAbi); - - // This is a bundled system app so choose the path based on the ABI. - // if it's a 64 bit abi, use lib64 otherwise use lib32. Note that this - // is just the default path. - final String apkName = deriveCodePathName(codePath); - final String libDir = is64Bit ? LIB64_DIR_NAME : LIB_DIR_NAME; - info.nativeLibraryRootDir = Environment.buildPath(new File(apkRoot), libDir, - apkName).getAbsolutePath(); - info.nativeLibraryRootRequiresIsa = false; - - info.nativeLibraryDir = info.nativeLibraryRootDir; - if (info.secondaryCpuAbi != null) { - final String secondaryLibDir = is64Bit ? LIB_DIR_NAME : LIB64_DIR_NAME; - info.secondaryNativeLibraryDir = Environment.buildPath(new File(apkRoot), - secondaryLibDir, apkName).getAbsolutePath(); - } - } else if (isApkFile(codeFile)) { + if (isApkFile(codeFile)) { // Monolithic install - if (asecApp) { + if (bundledApp) { + final boolean is64Bit = VMRuntime.is64BitInstructionSet( + getPrimaryInstructionSet(info)); + + // This is a bundled system app so choose the path based on the ABI. + // if it's a 64 bit abi, use lib64 otherwise use lib32. Note that this + // is just the default path. + final String apkName = deriveCodePathName(codePath); + final String libDir = is64Bit ? LIB64_DIR_NAME : LIB_DIR_NAME; + info.nativeLibraryRootDir = Environment.buildPath(new File(apkRoot), libDir, + apkName).getAbsolutePath(); + + if (info.secondaryCpuAbi != null) { + final String secondaryLibDir = is64Bit ? LIB_DIR_NAME : LIB64_DIR_NAME; + info.secondaryNativeLibraryDir = Environment.buildPath(new File(apkRoot), + secondaryLibDir, apkName).getAbsolutePath(); + } + } else if (asecApp) { info.nativeLibraryRootDir = new File(codeFile.getParentFile(), LIB_DIR_NAME) .getAbsolutePath(); } else { @@ -6271,10 +6266,8 @@ public class PackageManagerService extends IPackageManager.Stub { info.nativeLibraryRootDir = new File(codeFile, LIB_DIR_NAME).getAbsolutePath(); info.nativeLibraryRootRequiresIsa = true; - if (info.primaryCpuAbi != null) { - info.nativeLibraryDir = new File(info.nativeLibraryRootDir, - VMRuntime.getInstructionSet(info.primaryCpuAbi)).getAbsolutePath(); - } + info.nativeLibraryDir = new File(info.nativeLibraryRootDir, + getPrimaryInstructionSet(info)).getAbsolutePath(); if (info.secondaryCpuAbi != null) { info.secondaryNativeLibraryDir = new File(info.nativeLibraryRootDir, |