Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ef1982a authored by David Brazdil's avatar David Brazdil
Browse files

Remove UsageStats post-OTA package update filter

Filtering packages for boot-time post-OTA update with
UsageStatsManager idleness API is too aggressive and leaves out even
apps used heavily in the foreground. Remove for now.

Bug: 27902702
Bug: 28161327

Change-Id: I7912f9ad5d8c6206c19068a76383e370d24818db
parent 20895756
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -7085,9 +7085,6 @@ public class PackageManagerService extends IPackageManager.Stub {
            pkgs = PackageManagerServiceUtils.getPackagesForDexopt(mPackages.values(), this);
        }
        UsageStatsManager usageMgr =
                (UsageStatsManager) mContext.getSystemService(Context.USAGE_STATS_SERVICE);
        int curr = 0;
        int total = pkgs.size();
        for (PackageParser.Package pkg : pkgs) {
@@ -7100,13 +7097,6 @@ public class PackageManagerService extends IPackageManager.Stub {
                continue;
            }
            if (!causeFirstBoot && usageMgr.isAppInactive(pkg.packageName)) {
                if (DEBUG_DEXOPT) {
                    Log.i(TAG, "Skipping update of of idle app " + pkg.packageName);
                }
                continue;
            }
            if (DEBUG_DEXOPT) {
                Log.i(TAG, "Extracting app " + curr + " of " + total + ": " + pkg.packageName);
            }