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

Commit b53633e6 authored by Uma Maheshwari Bhiram's avatar Uma Maheshwari Bhiram Committed by Steve Kondik
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 d892764b
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;