diff options
author | Andreas Gampe <agampe@google.com> | 2015-03-10 02:10:22 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-10 02:10:22 +0000 |
commit | 174a44888ec56f688426c80d50b9e0021f47c16f (patch) | |
tree | 757c016179c9f1a989342ed9df1a5fb0ab987efb /services | |
parent | db7fa51ff0f330b79b171f03b4304a75affaabce (diff) | |
parent | 7f383873566024c7121cadae3bbdd2a7c47150bc (diff) | |
download | frameworks_base-174a44888ec56f688426c80d50b9e0021f47c16f.zip frameworks_base-174a44888ec56f688426c80d50b9e0021f47c16f.tar.gz frameworks_base-174a44888ec56f688426c80d50b9e0021f47c16f.tar.bz2 |
am 7f383873: Merge "Frameworks/base: Pass APK debugability to installd"
* commit '7f383873566024c7121cadae3bbdd2a7c47150bc':
Frameworks/base: Pass APK debugability to installd
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/pm/Installer.java | 5 | ||||
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 5 |
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 4dc65c2..b297887 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -4875,6 +4875,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; @@ -4900,10 +4901,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 |