am a724d865: Merge "Fix incorrect looping limits." into klp-dev
* commit 'a724d865372530e01e4bb14751e0305da9bc377b': Fix incorrect looping limits.
This commit is contained in:
@@ -565,7 +565,7 @@ final class ActivityStack {
|
||||
|
||||
// Move userId's tasks to the top.
|
||||
int index = mTaskHistory.size();
|
||||
for (int i = 0; i < index; ++i) {
|
||||
for (int i = 0; i < index; ) {
|
||||
TaskRecord task = mTaskHistory.get(i);
|
||||
if (task.userId == userId) {
|
||||
if (DEBUG_TASKS) Slog.d(TAG, "switchUserLocked: stack=" + getStackId() +
|
||||
@@ -573,6 +573,9 @@ final class ActivityStack {
|
||||
mTaskHistory.remove(i);
|
||||
mTaskHistory.add(task);
|
||||
--index;
|
||||
// Use same value for i.
|
||||
} else {
|
||||
++i;
|
||||
}
|
||||
}
|
||||
if (VALIDATE_TOKENS) {
|
||||
|
||||
Reference in New Issue
Block a user