am 384d84f4: Merge "Shorten first boot time by filtering dexopted apps by LRU."
* commit '384d84f4f02643b63335f6d8d884adc1186d6896': Shorten first boot time by filtering dexopted apps by LRU.
This commit is contained in:
@@ -6082,41 +6082,6 @@ public class PackageManagerService extends IPackageManager.Stub {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
// Give priority to system apps.
|
||||
for (Iterator<PackageParser.Package> it = pkgs.iterator(); it.hasNext();) {
|
||||
PackageParser.Package pkg = it.next();
|
||||
if (isSystemApp(pkg) && !pkg.isUpdatedSystemApp()) {
|
||||
if (DEBUG_DEXOPT) {
|
||||
Log.i(TAG, "Adding system app " + sortedPkgs.size() + ": " + pkg.packageName);
|
||||
}
|
||||
sortedPkgs.add(pkg);
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
// Give priority to updated system apps.
|
||||
for (Iterator<PackageParser.Package> it = pkgs.iterator(); it.hasNext();) {
|
||||
PackageParser.Package pkg = it.next();
|
||||
if (pkg.isUpdatedSystemApp()) {
|
||||
if (DEBUG_DEXOPT) {
|
||||
Log.i(TAG, "Adding updated system app " + sortedPkgs.size() + ": " + pkg.packageName);
|
||||
}
|
||||
sortedPkgs.add(pkg);
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
// Give priority to apps that listen for boot complete.
|
||||
intent = new Intent(Intent.ACTION_BOOT_COMPLETED);
|
||||
pkgNames = getPackageNamesForIntent(intent);
|
||||
for (Iterator<PackageParser.Package> it = pkgs.iterator(); it.hasNext();) {
|
||||
PackageParser.Package pkg = it.next();
|
||||
if (pkgNames.contains(pkg.packageName)) {
|
||||
if (DEBUG_DEXOPT) {
|
||||
Log.i(TAG, "Adding boot app " + sortedPkgs.size() + ": " + pkg.packageName);
|
||||
}
|
||||
sortedPkgs.add(pkg);
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
// Filter out packages that aren't recently used.
|
||||
filterRecentlyUsedApps(pkgs);
|
||||
// Add all remaining apps.
|
||||
|
||||
Reference in New Issue
Block a user