diff options
| author | Calin Juravle <calin@google.com> | 2014-08-27 14:22:15 +0100 |
|---|---|---|
| committer | Calin Juravle <calin@google.com> | 2014-08-27 14:49:11 +0100 |
| commit | e8d2ffd733c0598b99a91ce307b8f6411fcdafaa (patch) | |
| tree | ce9dd8da92008b4a5a115d530ebc9111e5ffe587 /services/java/com/android/server/pm/PackageManagerService.java | |
| parent | 9b5112c36b5163925cb303c0cd016bf4115c5800 (diff) | |
| download | frameworks_base-e8d2ffd733c0598b99a91ce307b8f6411fcdafaa.zip frameworks_base-e8d2ffd733c0598b99a91ce307b8f6411fcdafaa.tar.gz frameworks_base-e8d2ffd733c0598b99a91ce307b8f6411fcdafaa.tar.bz2 | |
Pass vmSafeMode (manifest attribute) to installd.
The flag is used to enforce --interpret-only flag when running dex2oat.
Bug: 12457423
(cherry picked from commit 11e08c010a42390803b65eaa698ca0e768aed896)
Change-Id: I215339527e998b24e274c8df42a5024839e6a9fa
Diffstat (limited to 'services/java/com/android/server/pm/PackageManagerService.java')
| -rwxr-xr-x | services/java/com/android/server/pm/PackageManagerService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java index cb41d72..4cbf845 100755 --- a/services/java/com/android/server/pm/PackageManagerService.java +++ b/services/java/com/android/server/pm/PackageManagerService.java @@ -4293,6 +4293,7 @@ public class PackageManagerService extends IPackageManager.Stub { } } + final boolean vmSafeMode = (pkg.applicationInfo.flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0; boolean performed = false; if ((pkg.applicationInfo.flags&ApplicationInfo.FLAG_HAS_CODE) != 0) { String path = pkg.mScanPath; @@ -4309,10 +4310,11 @@ public class PackageManagerService extends IPackageManager.Stub { // 2.) we are defering a needed dexopt // 3.) we are skipping an unneeded dexopt if (forceDex || (!defer && isDexOptNeededInternal == DexFile.DEXOPT_NEEDED)) { - Log.i(TAG, "Running dexopt on: " + pkg.applicationInfo.packageName); + Log.i(TAG, "Running dexopt on: " + pkg.applicationInfo.packageName + + " vmSafeMode=" + vmSafeMode); final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid); int ret = mInstaller.dexopt(path, sharedGid, !isForwardLocked(pkg), - pkg.packageName, dexCodeInstructionSet); + pkg.packageName, dexCodeInstructionSet, vmSafeMode); // Note that we ran dexopt, since rerunning will // probably just result in an error again. pkg.mDexOptNeeded = false; |
