am 9c4601e4: am 77b09382: Merge "[ActivityManager] Fix index OOB when updating visible." into mnc-dev

* commit '9c4601e4460fef39fe015087bf92a79cdd96d39f':
  [ActivityManager] Fix index OOB when updating visible.
This commit is contained in:
Wale Ogunwale
2015-06-18 15:16:55 +00:00
committed by Android Git Automerger

View File

@@ -1326,7 +1326,12 @@ final class ActivityStack {
if (r != starting) {
mStackSupervisor.startSpecificActivityLocked(
r, noStackActivityResumed, false);
noStackActivityResumed = false;
if (activityNdx >= activities.size()) {
// Record may be removed if its process needs to restart.
activityNdx = activities.size() - 1;
} else {
noStackActivityResumed = false;
}
}
} else if (r.visible) {