From b4998eec3c0b8f7364fa729ebae84fd0b9dc2546 Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Wed, 18 Dec 2013 16:43:51 -0800 Subject: Fix loop limits. Fixes bug 12207606. Change-Id: I9b450d2bc2a72a1f6581147f8930188f34c85299 --- services/java/com/android/server/am/TaskRecord.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/java/com/android/server/am/TaskRecord.java b/services/java/com/android/server/am/TaskRecord.java index 5f32dbb..9105103 100644 --- a/services/java/com/android/server/am/TaskRecord.java +++ b/services/java/com/android/server/am/TaskRecord.java @@ -163,7 +163,7 @@ final class TaskRecord extends ThumbnailHolder { final void setFrontOfTask() { boolean foundFront = false; final int numActivities = mActivities.size(); - for (int activityNdx = 0; numActivities < activityNdx; ++activityNdx) { + for (int activityNdx = 0; activityNdx < numActivities; ++activityNdx) { final ActivityRecord r = mActivities.get(activityNdx); if (foundFront || r.finishing) { r.frontOfTask = false; -- cgit v1.1