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

Commit 762abf6d 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: I195da10a8e9161572bdb653ad3021998d4f2a939
CRs-Fixed: 651963
parent 4cb51bed
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1065,6 +1065,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;