summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2015-10-13 10:00:10 -0700
committerJeff Hao <jeffhao@google.com>2015-10-13 17:49:15 +0000
commit71d3260ffa99bf7e580d9ebd979a1e7863b50223 (patch)
tree8c07723badab0f3ed9795267c367f2356e43376f /services
parentc024de3c946c18e8e4799eb8d372fdec3146f8cf (diff)
downloadframeworks_base-71d3260ffa99bf7e580d9ebd979a1e7863b50223.zip
frameworks_base-71d3260ffa99bf7e580d9ebd979a1e7863b50223.tar.gz
frameworks_base-71d3260ffa99bf7e580d9ebd979a1e7863b50223.tar.bz2
Shorten first boot time by filtering dexopted apps by LRU.
No longer dexopt all system apps and boot listener user apps. Bug: 23628238 Bug: https://code.google.com/p/android/issues/detail?id=186589 (cherry-picked from commit b84cb9e9719855d56ea74c2eb7afc49034c0e66f) Change-Id: Id1a1ca9f46777f9e62df3d4f25e98a2837fabf37
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java35
1 files changed, 0 insertions, 35 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 4756818..313972b 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -6083,41 +6083,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.