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

Commit 920de9aa authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Remove blocking GC on package installation.

It was introduced a long time ago and most probably not needed now.

Bug: 220083428
Test: presubmit
Change-Id: I4f19f06ec26b995a96ab95e2a37a7ddb2f4b740f
parent bf1d98de
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@ import com.android.server.pm.pkg.PackageStateInternal;
import com.android.server.pm.pkg.PackageUserState;
import com.android.server.wm.ActivityTaskManagerInternal;

import dalvik.system.VMRuntime;

import java.util.Collections;
import java.util.List;

@@ -245,8 +247,11 @@ final class DeletePackageHelper {
                info.sendSystemPackageUpdatedBroadcasts(disabledSystemPs.getAppId());
            }
        }
        // Force a gc here.
        Runtime.getRuntime().gc();

        // Force a gc to clear up things.
        // Ask for a background one, it's fine to go on and not block here.
        VMRuntime.getRuntime().requestConcurrentGC();

        // Delete the resources here after sending the broadcast to let
        // other processes clean up before deleting resources.
        synchronized (mPm.mInstallLock) {