Loading services/java/com/android/server/am/ActivityManagerService.java +20 −0 Original line number Diff line number Diff line Loading @@ -3355,6 +3355,24 @@ public final class ActivityManagerService extends ActivityManagerNative return ret; } //explicitly remove thd old information in mRecentTasks when removing existing user. private void removeRecentTaskLocked(int userId) { if(userId <= 0) { Slog.i(TAG, "Can't remove recent task on user " + userId); return; } for (int i = mRecentTasks.size() - 1; i >= 0; --i) { TaskRecord tr = mRecentTasks.get(i); if (tr.userId == userId) { if(DEBUG_TASKS) Slog.i(TAG, "remove RecentTask " + tr + " when finishing user" + userId); tr.disposeThumbnail(); mRecentTasks.remove(i); } } } final void addRecentTaskLocked(TaskRecord task) { int N = mRecentTasks.size(); // Quick case: check if the top-most recent task is the same. Loading Loading @@ -16503,6 +16521,8 @@ public final class ActivityManagerService extends ActivityManagerNative // Kill all the processes for the user. forceStopUserLocked(userId, "finish user"); } //explicitly remove the old information in mRecentTasks when removing existing user. removeRecentTaskLocked(userId); } for (int i=0; i<callbacks.size(); i++) { Loading
services/java/com/android/server/am/ActivityManagerService.java +20 −0 Original line number Diff line number Diff line Loading @@ -3355,6 +3355,24 @@ public final class ActivityManagerService extends ActivityManagerNative return ret; } //explicitly remove thd old information in mRecentTasks when removing existing user. private void removeRecentTaskLocked(int userId) { if(userId <= 0) { Slog.i(TAG, "Can't remove recent task on user " + userId); return; } for (int i = mRecentTasks.size() - 1; i >= 0; --i) { TaskRecord tr = mRecentTasks.get(i); if (tr.userId == userId) { if(DEBUG_TASKS) Slog.i(TAG, "remove RecentTask " + tr + " when finishing user" + userId); tr.disposeThumbnail(); mRecentTasks.remove(i); } } } final void addRecentTaskLocked(TaskRecord task) { int N = mRecentTasks.size(); // Quick case: check if the top-most recent task is the same. Loading Loading @@ -16503,6 +16521,8 @@ public final class ActivityManagerService extends ActivityManagerNative // Kill all the processes for the user. forceStopUserLocked(userId, "finish user"); } //explicitly remove the old information in mRecentTasks when removing existing user. removeRecentTaskLocked(userId); } for (int i=0; i<callbacks.size(); i++) {