Merge "Remove blocking GC on package installation." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d766d28caa
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user