Loading services/core/java/com/android/server/pm/PackageManagerService.java +28 −8 Original line number Original line Diff line number Diff line Loading @@ -6829,19 +6829,39 @@ public class PackageManagerService extends IPackageManager.Stub { // Extract pacakges only if profile-guided compilation is enabled because // Extract pacakges only if profile-guided compilation is enabled because // otherwise BackgroundDexOptService will not dexopt them later. // otherwise BackgroundDexOptService will not dexopt them later. if (mUseJitProfiles) { if (!mUseJitProfiles || !isUpgrade()) { return; } List<PackageParser.Package> pkgs; List<PackageParser.Package> pkgs; synchronized (mPackages) { synchronized (mPackages) { pkgs = PackageManagerServiceUtils.getPackagesForDexopt(mPackages.values(), this); pkgs = PackageManagerServiceUtils.getPackagesForDexopt(mPackages.values(), this); } } int curr = 0; int total = pkgs.size(); for (PackageParser.Package pkg : pkgs) { for (PackageParser.Package pkg : pkgs) { curr++; if (DEBUG_DEXOPT) { Log.i(TAG, "Extracting app " + curr + " of " + total + ": " + pkg.packageName); } if (!isFirstBoot()) { try { ActivityManagerNative.getDefault().showBootMessage( mContext.getResources().getString(R.string.android_upgrading_apk, curr, total), true); } catch (RemoteException e) { } } if (PackageDexOptimizer.canOptimizePackage(pkg)) { if (PackageDexOptimizer.canOptimizePackage(pkg)) { performDexOpt(pkg.packageName, null /* instructionSet */, performDexOpt(pkg.packageName, null /* instructionSet */, false /* useProfiles */, true /* extractOnly */, false /* force */); false /* useProfiles */, true /* extractOnly */, false /* force */); } } } } } } } @Override @Override public void notifyPackageUse(String packageName) { public void notifyPackageUse(String packageName) { Loading Loading
services/core/java/com/android/server/pm/PackageManagerService.java +28 −8 Original line number Original line Diff line number Diff line Loading @@ -6829,19 +6829,39 @@ public class PackageManagerService extends IPackageManager.Stub { // Extract pacakges only if profile-guided compilation is enabled because // Extract pacakges only if profile-guided compilation is enabled because // otherwise BackgroundDexOptService will not dexopt them later. // otherwise BackgroundDexOptService will not dexopt them later. if (mUseJitProfiles) { if (!mUseJitProfiles || !isUpgrade()) { return; } List<PackageParser.Package> pkgs; List<PackageParser.Package> pkgs; synchronized (mPackages) { synchronized (mPackages) { pkgs = PackageManagerServiceUtils.getPackagesForDexopt(mPackages.values(), this); pkgs = PackageManagerServiceUtils.getPackagesForDexopt(mPackages.values(), this); } } int curr = 0; int total = pkgs.size(); for (PackageParser.Package pkg : pkgs) { for (PackageParser.Package pkg : pkgs) { curr++; if (DEBUG_DEXOPT) { Log.i(TAG, "Extracting app " + curr + " of " + total + ": " + pkg.packageName); } if (!isFirstBoot()) { try { ActivityManagerNative.getDefault().showBootMessage( mContext.getResources().getString(R.string.android_upgrading_apk, curr, total), true); } catch (RemoteException e) { } } if (PackageDexOptimizer.canOptimizePackage(pkg)) { if (PackageDexOptimizer.canOptimizePackage(pkg)) { performDexOpt(pkg.packageName, null /* instructionSet */, performDexOpt(pkg.packageName, null /* instructionSet */, false /* useProfiles */, true /* extractOnly */, false /* force */); false /* useProfiles */, true /* extractOnly */, false /* force */); } } } } } } } @Override @Override public void notifyPackageUse(String packageName) { public void notifyPackageUse(String packageName) { Loading