Loading services/core/java/com/android/server/am/ActivityManagerService.java +20 −1 Original line number Diff line number Diff line Loading @@ -11449,6 +11449,7 @@ public final class ActivityManagerService extends ActivityManagerNative } mStackSupervisor.resumeTopActivitiesLocked(); sendUserSwitchBroadcastsLocked(-1, mCurrentUserId); performGcsForAllLocked(); } } Loading Loading @@ -17267,6 +17268,24 @@ public final class ActivityManagerService extends ActivityManagerNative } } /** * Perform GCs on all processes, we only call it one time when system ready */ final void performGcsForAllLocked() { final ArrayMap<String, SparseArray<ProcessRecord>> map = mProcessNames.getMap(); int mapSize = map.size(); ProcessRecord proc = null; for (int i = 0; i < mapSize; i++) { String name = map.keyAt(i); SparseArray<ProcessRecord> array = map.get(name); for (int j = 0; j < array.size(); j++) { proc = array.valueAt(j); performAppGcLocked(proc); } } } /** * If all looks good, perform GCs on all processes waiting for them. */ Loading
services/core/java/com/android/server/am/ActivityManagerService.java +20 −1 Original line number Diff line number Diff line Loading @@ -11449,6 +11449,7 @@ public final class ActivityManagerService extends ActivityManagerNative } mStackSupervisor.resumeTopActivitiesLocked(); sendUserSwitchBroadcastsLocked(-1, mCurrentUserId); performGcsForAllLocked(); } } Loading Loading @@ -17267,6 +17268,24 @@ public final class ActivityManagerService extends ActivityManagerNative } } /** * Perform GCs on all processes, we only call it one time when system ready */ final void performGcsForAllLocked() { final ArrayMap<String, SparseArray<ProcessRecord>> map = mProcessNames.getMap(); int mapSize = map.size(); ProcessRecord proc = null; for (int i = 0; i < mapSize; i++) { String name = map.keyAt(i); SparseArray<ProcessRecord> array = map.get(name); for (int j = 0; j < array.size(); j++) { proc = array.valueAt(j); performAppGcLocked(proc); } } } /** * If all looks good, perform GCs on all processes waiting for them. */