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

Commit a36bb31d authored by Uma Maheshwari Bhiram's avatar Uma Maheshwari Bhiram Committed by Gerrit - the friendly Code Review server
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: I195da10a8e9161572bdb653ad3021998d4f2a939
CRs-Fixed: 651963
parent 4398b0b8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1060,6 +1060,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;