summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-03-09 22:14:53 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-09 22:14:54 +0000
commit7f383873566024c7121cadae3bbdd2a7c47150bc (patch)
treeebf44f336e9290e83503df2476a5a2dbf587a0e0 /services
parentc74467902b5a9a7267b6cb8f30b364b8373eac72 (diff)
parent735600c1e654ef3d4fe1201aa31d1f4eb33c18e3 (diff)
downloadframeworks_base-7f383873566024c7121cadae3bbdd2a7c47150bc.zip
frameworks_base-7f383873566024c7121cadae3bbdd2a7c47150bc.tar.gz
frameworks_base-7f383873566024c7121cadae3bbdd2a7c47150bc.tar.bz2
Merge "Frameworks/base: Pass APK debugability to installd"
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/Installer.java5
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java5
2 files changed, 6 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/pm/Installer.java b/services/core/java/com/android/server/pm/Installer.java
index 31c604f..5cde8ea 100644
--- a/services/core/java/com/android/server/pm/Installer.java
+++ b/services/core/java/com/android/server/pm/Installer.java
@@ -83,13 +83,14 @@ public final class Installer extends SystemService {
}
public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName,
- String instructionSet, boolean vmSafeMode) {
+ String instructionSet, boolean vmSafeMode, boolean debuggable) {
if (!isValidInstructionSet(instructionSet)) {
Slog.e(TAG, "Invalid instruction set: " + instructionSet);
return -1;
}
- return mInstaller.dexopt(apkPath, uid, isPublic, pkgName, instructionSet, vmSafeMode);
+ return mInstaller.dexopt(apkPath, uid, isPublic, pkgName, instructionSet, vmSafeMode,
+ debuggable);
}
public int idmap(String targetApkPath, String overlayApkPath, int uid) {
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 856135f..f80b473 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -4771,6 +4771,7 @@ public class PackageManagerService extends IPackageManager.Stub {
}
final boolean vmSafeMode = (pkg.applicationInfo.flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0;
+ final boolean debuggable = (pkg.applicationInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
final List<String> paths = pkg.getAllCodePathsExcludingResourceOnly();
boolean performedDexOpt = false;
@@ -4796,10 +4797,10 @@ public class PackageManagerService extends IPackageManager.Stub {
if (forceDex || (!defer && isDexOptNeeded == DexFile.DEXOPT_NEEDED)) {
Log.i(TAG, "Running dexopt on: " + path + " pkg="
+ pkg.applicationInfo.packageName + " isa=" + dexCodeInstructionSet
- + " vmSafeMode=" + vmSafeMode);
+ + " vmSafeMode=" + vmSafeMode + " debuggable=" + debuggable);
final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid);
final int ret = mInstaller.dexopt(path, sharedGid, !isForwardLocked(pkg),
- pkg.packageName, dexCodeInstructionSet, vmSafeMode);
+ pkg.packageName, dexCodeInstructionSet, vmSafeMode, debuggable);
if (ret < 0) {
// Don't bother running dexopt again if we failed, it will probably