summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-05-15 09:42:44 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-15 09:42:45 +0000
commit1e74c37f8e1acb595f407e0f65744bb6b00c9314 (patch)
tree14547083e7f73c843565fc6864d60db22a61e915 /services
parent4d806214767ec010cef1d58e706ba59e1f0b9ad0 (diff)
parent34f6084bc21b07ae9112be6e7a8f50c49828ac9c (diff)
downloadframeworks_base-1e74c37f8e1acb595f407e0f65744bb6b00c9314.zip
frameworks_base-1e74c37f8e1acb595f407e0f65744bb6b00c9314.tar.gz
frameworks_base-1e74c37f8e1acb595f407e0f65744bb6b00c9314.tar.bz2
Merge "Remove "required" prefix from ABI fields."
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java2
-rwxr-xr-xservices/core/java/com/android/server/pm/PackageManagerService.java45
-rw-r--r--services/core/java/com/android/server/pm/PackageSetting.java4
-rw-r--r--services/core/java/com/android/server/pm/PackageSettingBase.java12
-rw-r--r--services/core/java/com/android/server/pm/Settings.java46
5 files changed, 54 insertions, 55 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 4ed6876..bab5b9c 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -2920,7 +2920,7 @@ public final class ActivityManagerService extends ActivityManagerNative
debugFlags |= Zygote.DEBUG_ENABLE_ASSERT;
}
- String requiredAbi = app.info.requiredCpuAbi;
+ String requiredAbi = app.info.cpuAbi;
if (requiredAbi == null) {
requiredAbi = Build.SUPPORTED_ABIS[0];
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index a3ecc05..f9eabcd 100755
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -161,7 +161,6 @@ import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
-import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.text.SimpleDateFormat;
@@ -2274,7 +2273,7 @@ public class PackageManagerService extends IPackageManager.Stub {
pkg.applicationInfo.dataDir =
getDataPathForPackage(packageName, 0).getPath();
pkg.applicationInfo.nativeLibraryDir = ps.nativeLibraryPathString;
- pkg.applicationInfo.requiredCpuAbi = ps.requiredCpuAbiString;
+ pkg.applicationInfo.cpuAbi = ps.cpuAbiString;
}
return generatePackageInfo(pkg, flags, userId);
}
@@ -4704,8 +4703,8 @@ public class PackageManagerService extends IPackageManager.Stub {
private String getAppInstructionSet(ApplicationInfo info) {
String instructionSet = getPreferredInstructionSet();
- if (info.requiredCpuAbi != null) {
- instructionSet = VMRuntime.getInstructionSet(info.requiredCpuAbi);
+ if (info.cpuAbi != null) {
+ instructionSet = VMRuntime.getInstructionSet(info.cpuAbi);
}
return instructionSet;
@@ -4714,8 +4713,8 @@ public class PackageManagerService extends IPackageManager.Stub {
private String getAppInstructionSetFromSettings(PackageSetting ps) {
String instructionSet = getPreferredInstructionSet();
- if (ps.requiredCpuAbiString != null) {
- instructionSet = VMRuntime.getInstructionSet(ps.requiredCpuAbiString);
+ if (ps.cpuAbiString != null) {
+ instructionSet = VMRuntime.getInstructionSet(ps.cpuAbiString);
}
return instructionSet;
@@ -5103,7 +5102,7 @@ public class PackageManagerService extends IPackageManager.Stub {
// the PkgSetting exists already and doesn't have to be created.
pkgSetting = mSettings.getPackageLPw(pkg, origPackage, realName, suid, destCodeFile,
destResourceFile, pkg.applicationInfo.nativeLibraryDir,
- pkg.applicationInfo.requiredCpuAbi,
+ pkg.applicationInfo.cpuAbi,
pkg.applicationInfo.flags, user, false);
if (pkgSetting == null) {
Slog.w(TAG, "Creating application package " + pkg.packageName + " failed");
@@ -5431,9 +5430,9 @@ public class PackageManagerService extends IPackageManager.Stub {
// We've successfully copied native libraries across, so we make a
// note of what ABI we're using
if (copyRet != PackageManager.NO_NATIVE_LIBRARIES) {
- pkg.applicationInfo.requiredCpuAbi = Build.SUPPORTED_ABIS[copyRet];
+ pkg.applicationInfo.cpuAbi = Build.SUPPORTED_ABIS[copyRet];
} else {
- pkg.applicationInfo.requiredCpuAbi = null;
+ pkg.applicationInfo.cpuAbi = null;
}
} catch (IOException e) {
Slog.e(TAG, "Unable to copy native libraries", e);
@@ -5451,12 +5450,12 @@ public class PackageManagerService extends IPackageManager.Stub {
final NativeLibraryHelper.ApkHandle handle = new NativeLibraryHelper.ApkHandle(scanFile);
final int abi = NativeLibraryHelper.findSupportedAbi(handle, Build.SUPPORTED_ABIS);
if (abi >= 0) {
- pkg.applicationInfo.requiredCpuAbi = Build.SUPPORTED_ABIS[abi];
+ pkg.applicationInfo.cpuAbi = Build.SUPPORTED_ABIS[abi];
} else if (abi == PackageManager.NO_NATIVE_LIBRARIES) {
// Note that (non upgraded) system apps will not have any native
// libraries bundled in their APK, but we're guaranteed not to be
// such an app at this point.
- pkg.applicationInfo.requiredCpuAbi = null;
+ pkg.applicationInfo.cpuAbi = null;
} else {
mLastScanError = PackageManager.INSTALL_FAILED_INTERNAL_ERROR;
return null;
@@ -5966,8 +5965,8 @@ public class PackageManagerService extends IPackageManager.Stub {
String requiredInstructionSet = null;
PackageSetting requirer = null;
for (PackageSetting ps : packagesForUser) {
- if (ps.requiredCpuAbiString != null) {
- final String instructionSet = VMRuntime.getInstructionSet(ps.requiredCpuAbiString);
+ if (ps.cpuAbiString != null) {
+ final String instructionSet = VMRuntime.getInstructionSet(ps.cpuAbiString);
if (requiredInstructionSet != null) {
if (!instructionSet.equals(requiredInstructionSet)) {
// We have a mismatch between instruction sets (say arm vs arm64).
@@ -5995,11 +5994,11 @@ public class PackageManagerService extends IPackageManager.Stub {
if (requiredInstructionSet != null) {
for (PackageSetting ps : packagesForUser) {
- if (ps.requiredCpuAbiString == null) {
- ps.requiredCpuAbiString = requirer.requiredCpuAbiString;
+ if (ps.cpuAbiString == null) {
+ ps.cpuAbiString = requirer.cpuAbiString;
if (ps.pkg != null) {
- ps.pkg.applicationInfo.requiredCpuAbi = requirer.requiredCpuAbiString;
- Slog.i(TAG, "Adjusting ABI for : " + ps.name + " to " + ps.requiredCpuAbiString);
+ ps.pkg.applicationInfo.cpuAbi = requirer.cpuAbiString;
+ Slog.i(TAG, "Adjusting ABI for : " + ps.name + " to " + ps.cpuAbiString);
if (doDexOpt) {
performDexOptLI(ps.pkg, forceDexOpt, deferDexOpt, true);
mInstaller.rmdex(ps.codePathString, getPreferredInstructionSet());
@@ -6102,15 +6101,15 @@ public class PackageManagerService extends IPackageManager.Stub {
// Assume that the bundled native libraries always correspond to the
// most preferred 32 or 64 bit ABI.
if (lib64.exists()) {
- pkg.applicationInfo.requiredCpuAbi = Build.SUPPORTED_64_BIT_ABIS[0];
- pkgSetting.requiredCpuAbiString = Build.SUPPORTED_64_BIT_ABIS[0];
+ pkg.applicationInfo.cpuAbi = Build.SUPPORTED_64_BIT_ABIS[0];
+ pkgSetting.cpuAbiString = Build.SUPPORTED_64_BIT_ABIS[0];
} else if (lib.exists()) {
- pkg.applicationInfo.requiredCpuAbi = Build.SUPPORTED_32_BIT_ABIS[0];
- pkgSetting.requiredCpuAbiString = Build.SUPPORTED_32_BIT_ABIS[0];
+ pkg.applicationInfo.cpuAbi = Build.SUPPORTED_32_BIT_ABIS[0];
+ pkgSetting.cpuAbiString = Build.SUPPORTED_32_BIT_ABIS[0];
} else {
// This is the case where the app has no native code.
- pkg.applicationInfo.requiredCpuAbi = null;
- pkgSetting.requiredCpuAbiString = null;
+ pkg.applicationInfo.cpuAbi = null;
+ pkgSetting.cpuAbiString = null;
}
}
diff --git a/services/core/java/com/android/server/pm/PackageSetting.java b/services/core/java/com/android/server/pm/PackageSetting.java
index 15df3d2..284da99 100644
--- a/services/core/java/com/android/server/pm/PackageSetting.java
+++ b/services/core/java/com/android/server/pm/PackageSetting.java
@@ -30,8 +30,8 @@ final class PackageSetting extends PackageSettingBase {
SharedUserSetting sharedUser;
PackageSetting(String name, String realName, File codePath, File resourcePath,
- String nativeLibraryPathString, String requiredCpuAbiString, int pVersionCode, int pkgFlags) {
- super(name, realName, codePath, resourcePath, nativeLibraryPathString, requiredCpuAbiString, pVersionCode,
+ String nativeLibraryPathString, String cpuAbiString, int pVersionCode, int pkgFlags) {
+ super(name, realName, codePath, resourcePath, nativeLibraryPathString, cpuAbiString, pVersionCode,
pkgFlags);
}
diff --git a/services/core/java/com/android/server/pm/PackageSettingBase.java b/services/core/java/com/android/server/pm/PackageSettingBase.java
index c8af9d1..7fee372 100644
--- a/services/core/java/com/android/server/pm/PackageSettingBase.java
+++ b/services/core/java/com/android/server/pm/PackageSettingBase.java
@@ -50,7 +50,7 @@ class PackageSettingBase extends GrantedPermissions {
File resourcePath;
String resourcePathString;
String nativeLibraryPathString;
- String requiredCpuAbiString;
+ String cpuAbiString;
long timeStamp;
long firstInstallTime;
long lastUpdateTime;
@@ -78,11 +78,11 @@ 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 requiredCpuAbiString, int pVersionCode, int pkgFlags) {
+ String nativeLibraryPathString, String cpuAbiString, int pVersionCode, int pkgFlags) {
super(pkgFlags);
this.name = name;
this.realName = realName;
- init(codePath, resourcePath, nativeLibraryPathString, requiredCpuAbiString, pVersionCode);
+ init(codePath, resourcePath, nativeLibraryPathString, cpuAbiString, pVersionCode);
}
/**
@@ -99,7 +99,7 @@ class PackageSettingBase extends GrantedPermissions {
resourcePath = base.resourcePath;
resourcePathString = base.resourcePathString;
nativeLibraryPathString = base.nativeLibraryPathString;
- requiredCpuAbiString = base.requiredCpuAbiString;
+ cpuAbiString = base.cpuAbiString;
timeStamp = base.timeStamp;
firstInstallTime = base.firstInstallTime;
lastUpdateTime = base.lastUpdateTime;
@@ -133,7 +133,7 @@ class PackageSettingBase extends GrantedPermissions {
this.resourcePath = resourcePath;
this.resourcePathString = resourcePath.toString();
this.nativeLibraryPathString = nativeLibraryPathString;
- this.requiredCpuAbiString = requiredCpuAbiString;
+ this.cpuAbiString = requiredCpuAbiString;
this.versionCode = pVersionCode;
}
@@ -164,7 +164,7 @@ class PackageSettingBase extends GrantedPermissions {
grantedPermissions = base.grantedPermissions;
gids = base.gids;
- requiredCpuAbiString = base.requiredCpuAbiString;
+ cpuAbiString = base.cpuAbiString;
timeStamp = base.timeStamp;
firstInstallTime = base.firstInstallTime;
lastUpdateTime = base.lastUpdateTime;
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 599d2a7..d37b240 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -260,10 +260,10 @@ final class Settings {
PackageSetting getPackageLPw(PackageParser.Package pkg, PackageSetting origPackage,
String realName, SharedUserSetting sharedUser, File codePath, File resourcePath,
- String nativeLibraryPathString, String requiredCpuAbiString, int pkgFlags, UserHandle user, boolean add) {
+ String nativeLibraryPathString, String cpuAbiString, int pkgFlags, UserHandle user, boolean add) {
final String name = pkg.packageName;
PackageSetting p = getPackageLPw(name, origPackage, realName, sharedUser, codePath,
- resourcePath, nativeLibraryPathString, requiredCpuAbiString, pkg.mVersionCode, pkgFlags,
+ resourcePath, nativeLibraryPathString, cpuAbiString, pkg.mVersionCode, pkgFlags,
user, add, true /* allowInstall */);
return p;
}
@@ -350,7 +350,7 @@ final class Settings {
p.pkg.applicationInfo.flags &= ~ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
}
PackageSetting ret = addPackageLPw(name, p.realName, p.codePath, p.resourcePath,
- p.nativeLibraryPathString, p.requiredCpuAbiString, p.appId, p.versionCode, p.pkgFlags);
+ p.nativeLibraryPathString, p.cpuAbiString, p.appId, p.versionCode, p.pkgFlags);
mDisabledSysPackages.remove(name);
return ret;
}
@@ -364,7 +364,7 @@ final class Settings {
}
PackageSetting addPackageLPw(String name, String realName, File codePath, File resourcePath,
- String nativeLibraryPathString, String requiredCpuAbiString, int uid, int vc, int pkgFlags) {
+ String nativeLibraryPathString, String cpuAbiString, int uid, int vc, int pkgFlags) {
PackageSetting p = mPackages.get(name);
if (p != null) {
if (p.appId == uid) {
@@ -374,7 +374,7 @@ final class Settings {
"Adding duplicate package, keeping first: " + name);
return null;
}
- p = new PackageSetting(name, realName, codePath, resourcePath, nativeLibraryPathString, requiredCpuAbiString,
+ p = new PackageSetting(name, realName, codePath, resourcePath, nativeLibraryPathString, cpuAbiString,
vc, pkgFlags);
p.appId = uid;
if (addUserIdLPw(uid, p, name)) {
@@ -443,11 +443,11 @@ final class Settings {
private PackageSetting getPackageLPw(String name, PackageSetting origPackage,
String realName, SharedUserSetting sharedUser, File codePath, File resourcePath,
- String nativeLibraryPathString, String requiredCpuAbiString, int vc, int pkgFlags,
+ String nativeLibraryPathString, String cpuAbiString, int vc, int pkgFlags,
UserHandle installUser, boolean add, boolean allowInstall) {
PackageSetting p = mPackages.get(name);
if (p != null) {
- p.requiredCpuAbiString = requiredCpuAbiString;
+ p.cpuAbiString = cpuAbiString;
if (!p.codePath.equals(codePath)) {
// Check to see if its a disabled system app
if ((p.pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0) {
@@ -491,7 +491,7 @@ final class Settings {
if (origPackage != null) {
// We are consuming the data from an existing package.
p = new PackageSetting(origPackage.name, name, codePath, resourcePath,
- nativeLibraryPathString, requiredCpuAbiString, vc, pkgFlags);
+ nativeLibraryPathString, cpuAbiString, vc, pkgFlags);
if (PackageManagerService.DEBUG_UPGRADE) Log.v(PackageManagerService.TAG, "Package "
+ name + " is adopting original package " + origPackage.name);
// Note that we will retain the new package's signature so
@@ -508,7 +508,7 @@ final class Settings {
p.setTimeStamp(codePath.lastModified());
} else {
p = new PackageSetting(name, realName, codePath, resourcePath,
- nativeLibraryPathString, requiredCpuAbiString, vc, pkgFlags);
+ nativeLibraryPathString, cpuAbiString, vc, pkgFlags);
p.setTimeStamp(codePath.lastModified());
p.sharedUser = sharedUser;
// If this is not a system app, it starts out stopped.
@@ -635,7 +635,7 @@ final class Settings {
p.nativeLibraryPathString = nativeLibraryPath;
}
// Update the required Cpu Abi
- p.requiredCpuAbiString = pkg.applicationInfo.requiredCpuAbi;
+ p.cpuAbiString = pkg.applicationInfo.cpuAbi;
// Update version code if needed
if (pkg.mVersionCode != p.versionCode) {
p.versionCode = pkg.mVersionCode;
@@ -1690,8 +1690,8 @@ final class Settings {
if (pkg.nativeLibraryPathString != null) {
serializer.attribute(null, "nativeLibraryPath", pkg.nativeLibraryPathString);
}
- if (pkg.requiredCpuAbiString != null) {
- serializer.attribute(null, "requiredCpuAbi", pkg.requiredCpuAbiString);
+ if (pkg.cpuAbiString != null) {
+ serializer.attribute(null, "requiredCpuAbi", pkg.cpuAbiString);
}
if (pkg.sharedUser == null) {
serializer.attribute(null, "userId", Integer.toString(pkg.appId));
@@ -1735,8 +1735,8 @@ final class Settings {
if (pkg.nativeLibraryPathString != null) {
serializer.attribute(null, "nativeLibraryPath", pkg.nativeLibraryPathString);
}
- if (pkg.requiredCpuAbiString != null) {
- serializer.attribute(null, "requiredCpuAbi", pkg.requiredCpuAbiString);
+ if (pkg.cpuAbiString != null) {
+ serializer.attribute(null, "requiredCpuAbi", pkg.cpuAbiString);
}
serializer.attribute(null, "flags", Integer.toString(pkg.pkgFlags));
serializer.attribute(null, "ft", Long.toHexString(pkg.timeStamp));
@@ -2023,7 +2023,7 @@ final class Settings {
if (idObj != null && idObj instanceof SharedUserSetting) {
PackageSetting p = getPackageLPw(pp.name, null, pp.realName,
(SharedUserSetting) idObj, pp.codePath, pp.resourcePath,
- pp.nativeLibraryPathString, pp.requiredCpuAbiString, pp.versionCode, pp.pkgFlags,
+ pp.nativeLibraryPathString, pp.cpuAbiString, pp.versionCode, pp.pkgFlags,
null, true /* add */, false /* allowInstall */);
if (p == null) {
PackageManagerService.reportSettingsProblem(Log.WARN,
@@ -2443,7 +2443,7 @@ final class Settings {
String codePathStr = parser.getAttributeValue(null, "codePath");
String resourcePathStr = parser.getAttributeValue(null, "resourcePath");
String nativeLibraryPathStr = parser.getAttributeValue(null, "nativeLibraryPath");
- String requiredCpuAbiString = parser.getAttributeValue(null, "requiredCpuAbi");
+ String cpuAbiString = parser.getAttributeValue(null, "requiredCpuAbi");
if (resourcePathStr == null) {
resourcePathStr = codePathStr;
@@ -2464,7 +2464,7 @@ final class Settings {
pkgFlags |= ApplicationInfo.FLAG_PRIVILEGED;
}
PackageSetting ps = new PackageSetting(name, realName, codePathFile,
- new File(resourcePathStr), nativeLibraryPathStr, requiredCpuAbiString, versionCode, pkgFlags);
+ new File(resourcePathStr), nativeLibraryPathStr, cpuAbiString, versionCode, pkgFlags);
String timeStampStr = parser.getAttributeValue(null, "ft");
if (timeStampStr != null) {
try {
@@ -2531,7 +2531,7 @@ final class Settings {
String codePathStr = null;
String resourcePathStr = null;
String nativeLibraryPathStr = null;
- String requiredCpuAbiString = null;
+ String cpuAbiString = null;
String systemStr = null;
String installerPackageName = null;
String uidError = null;
@@ -2551,7 +2551,7 @@ final class Settings {
codePathStr = parser.getAttributeValue(null, "codePath");
resourcePathStr = parser.getAttributeValue(null, "resourcePath");
nativeLibraryPathStr = parser.getAttributeValue(null, "nativeLibraryPath");
- requiredCpuAbiString = parser.getAttributeValue(null, "requiredCpuAbi");
+ cpuAbiString = parser.getAttributeValue(null, "requiredCpuAbi");
version = parser.getAttributeValue(null, "version");
if (version != null) {
@@ -2629,7 +2629,7 @@ final class Settings {
+ parser.getPositionDescription());
} else if (userId > 0) {
packageSetting = addPackageLPw(name.intern(), realName, new File(codePathStr),
- new File(resourcePathStr), nativeLibraryPathStr, requiredCpuAbiString, userId, versionCode,
+ new File(resourcePathStr), nativeLibraryPathStr, cpuAbiString, userId, versionCode,
pkgFlags);
if (PackageManagerService.DEBUG_SETTINGS)
Log.i(PackageManagerService.TAG, "Reading package " + name + ": userId="
@@ -2647,7 +2647,7 @@ final class Settings {
userId = sharedIdStr != null ? Integer.parseInt(sharedIdStr) : 0;
if (userId > 0) {
packageSetting = new PendingPackage(name.intern(), realName, new File(
- codePathStr), new File(resourcePathStr), nativeLibraryPathStr, requiredCpuAbiString, userId,
+ codePathStr), new File(resourcePathStr), nativeLibraryPathStr, cpuAbiString, userId,
versionCode, pkgFlags);
packageSetting.setTimeStamp(timeStamp);
packageSetting.firstInstallTime = firstInstallTime;
@@ -2676,7 +2676,7 @@ final class Settings {
packageSetting.uidError = "true".equals(uidError);
packageSetting.installerPackageName = installerPackageName;
packageSetting.nativeLibraryPathString = nativeLibraryPathStr;
- packageSetting.requiredCpuAbiString = requiredCpuAbiString;
+ packageSetting.cpuAbiString = cpuAbiString;
// Handle legacy string here for single-user mode
final String enabledStr = parser.getAttributeValue(null, ATTR_ENABLED);
if (enabledStr != null) {
@@ -3176,7 +3176,7 @@ final class Settings {
pw.print(prefix); pw.print(" codePath="); pw.println(ps.codePathString);
pw.print(prefix); pw.print(" resourcePath="); pw.println(ps.resourcePathString);
pw.print(prefix); pw.print(" nativeLibraryPath="); pw.println(ps.nativeLibraryPathString);
- pw.print(prefix); pw.print(" requiredCpuAbi="); pw.println(ps.requiredCpuAbiString);
+ pw.print(prefix); pw.print(" requiredCpuAbi="); pw.println(ps.cpuAbiString);
pw.print(prefix); pw.print(" versionCode="); pw.print(ps.versionCode);
if (ps.pkg != null) {
pw.print(" targetSdk="); pw.print(ps.pkg.applicationInfo.targetSdkVersion);