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

Commit 610f0973 authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

Merge "PackageManager: Change post-install GC request" into oc-dev am: 89b51895

am: 0ce0752e

Change-Id: I5450d0f44c67201e9917f69ec430421d5643f765
parents b1ea1b08 0ce0752e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2027,15 +2027,17 @@ public class PackageManagerService extends IPackageManager.Stub
            EventLog.writeEvent(EventLogTags.UNKNOWN_SOURCES_ENABLED,
                    getUnknownSourcesSettings());
            // Force a gc to clear up things
            Runtime.getRuntime().gc();
            // Remove the replaced package's older resources safely now
            // We delete after a gc for applications  on sdcard.
            if (res.removedInfo != null && res.removedInfo.args != null) {
                Runtime.getRuntime().gc();
                synchronized (mInstallLock) {
                    res.removedInfo.args.doPostDeleteLI(true);
                }
            } else {
                // 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();
            }
            // Notify DexManager that the package was installed for new users.