diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowProcessController.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java index 8685723a5807..c34aa2b336cd 100644 --- a/services/core/java/com/android/server/wm/WindowProcessController.java +++ b/services/core/java/com/android/server/wm/WindowProcessController.java @@ -378,8 +378,9 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio } void handleAppCrash() { - for (int i = mActivities.size() - 1; i >= 0; --i) { - final ActivityRecord r = mActivities.get(i); + ArrayList<ActivityRecord> activities = new ArrayList<>(mActivities); + for (int i = activities.size() - 1; i >= 0; --i) { + final ActivityRecord r = activities.get(i); Slog.w(TAG, " Force finishing activity " + r.mActivityComponent.flattenToShortString()); r.detachFromProcess(); |