diff options
| author | 2012-11-15 14:07:54 +0530 | |
|---|---|---|
| committer | 2013-05-28 13:46:24 -0700 | |
| commit | 46c94b6626b441fe9715298f95c0a55d32d23875 (patch) | |
| tree | ab3f5d138f05e8f1e72bb1170c5c6e18a651a133 | |
| parent | e0329cae82dac7a650d505f9baafbd98e511e339 (diff) | |
DO NOT MERGE. Framework/base: Added synchronization block to avoid race condition
Fix for the synchronization issue leading to access of an array
Index out of bounds. Issue occurs due to race condition between
removing the activities of a crashed process from history stack
and resuming a separate activity.
Change-Id: I14bb5834e778c15b674248e46fe93b0ce9f37967
| -rw-r--r-- | services/java/com/android/server/am/ActivityStack.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 0f1700dce5c6..c344023070a0 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -3655,7 +3655,9 @@ final class ActivityStack { } if (activityRemoved) { - resumeTopActivityLocked(null); + synchronized (mService) { + resumeTopActivityLocked(null); + } } return res; |