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

Commit d766d28c authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "Remove blocking GC on package installation." into tm-dev

parents 6c13814c 920de9aa
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) {