From efc022768eba2f33d3fadbda7eaa6adf1730d3fc Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Mon, 25 Sep 2017 18:13:38 -0700 Subject: [PATCH] Remove obsolete & broken handling of precompiled sys apps During the times we used verify-profile for OTAs we had to ensure that prebuilds do not regress by verifying at runtime. For that we added a hackish check in PMS. Now, we no longer use verify-profile and we have no configuration which will leave the prebuilds unverified (assume-verify does not count here). So, we can remove this check which blocks system apps to be compiled with speed-profile. (Also worth mentioning that !Environment.getReferenceProfile(pkg.packageName).exists() was broken... most likely because of an SElinux policy update which we did not handled :/ ) Bug: 66903791 Test: build & boot Change-Id: I981e463d61c42ab8455d489ff86cc300632a2a90 --- .../android/server/pm/PackageManagerService.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index ed8dd8b408a0d..bbb58ac7886c9 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -9796,19 +9796,6 @@ public class PackageManagerService extends IPackageManager.Stub } } - // If the OTA updates a system app which was previously preopted to a non-preopted state - // the app might end up being verified at runtime. That's because by default the apps - // are verify-profile but for preopted apps there's no profile. - // Do a hacky check to ensure that if we have no profiles (a reasonable indication - // that before the OTA the app was preopted) the app gets compiled with a non-profile - // filter (by default 'quicken'). - // Note that at this stage unused apps are already filtered. - if (isSystemApp(pkg) && - DexFile.isProfileGuidedCompilerFilter(compilerFilter) && - !Environment.getReferenceProfile(pkg.packageName).exists()) { - compilerFilter = getNonProfileGuidedCompilerFilter(compilerFilter); - } - // checkProfiles is false to avoid merging profiles during boot which // might interfere with background compilation (b/28612421). // Unfortunately this will also means that "pm.dexopt.boot=speed-profile" will