summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Craig Mautner <cmautner@google.com> 2014-08-04 09:46:31 -0700
committer Craig Mautner <cmautner@google.com> 2014-08-04 09:46:31 -0700
commitcc9537ce558de42577feebeb91a8cc72e102ae2e (patch)
tree67d575ae088111586597278c13a837915a9b2292
parentcb566aab57cafb69c628809fc0a0ffa2151c7d6e (diff)
Call method while holding lock.
The method removeRecentTasksForUser() was being called without the ActivityManagerService lock held. This change calles it while the lock is held and renames it to indicate that it should be called while holding the lock. Fixes bug 16775111. Change-Id: I002f9f96d407de458934da8bc728acd54f0c398c
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 0ad36fc537b7..275185ae9d72 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -3695,7 +3695,7 @@ public final class ActivityManagerService extends ActivityManagerNative
}
//explicitly remove thd old information in mRecentTasks when removing existing user.
- private void removeRecentTasksForUser(int userId) {
+ private void removeRecentTasksForUserLocked(int userId) {
if(userId <= 0) {
Slog.i(TAG, "Can't remove recent task on user " + userId);
return;
@@ -17724,10 +17724,10 @@ public final class ActivityManagerService extends ActivityManagerNative
// Kill all the processes for the user.
forceStopUserLocked(userId, "finish user");
}
- }
- // Explicitly remove the old information in mRecentTasks.
- removeRecentTasksForUser(userId);
+ // Explicitly remove the old information in mRecentTasks.
+ removeRecentTasksForUserLocked(userId);
+ }
for (int i=0; i<callbacks.size(); i++) {
try {