Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 681f2760 authored by Uma Maheshwari Bhiram's avatar Uma Maheshwari Bhiram Committed by Linux Build Service Account
Browse files

Fixing IndexOutOfBounds Exception in ActivityManager

Bypass the iteration to avoid the exception during
the execution of ensureActivityVisibleLocked() because
startSpecificActivityLocked() within the loop may delete
the elements from History stack.

Change-Id: I0fdf098973fb167958959fc49a65a7130fad02d5
parent 3531fba7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1240,6 +1240,9 @@ final class ActivityStack {
            final TaskRecord task = mTaskHistory.get(taskNdx);
            final ArrayList<ActivityRecord> activities = task.mActivities;
            for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
                if(activityNdx >= activities.size()) {
                    continue;
                }
                final ActivityRecord r = activities.get(activityNdx);
                if (r.finishing) {
                    continue;