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

Commit b9132543 authored by Craig Mautner's avatar Craig Mautner Committed by Android Git Automerger
Browse files

am a724d865: Merge "Fix incorrect looping limits." into klp-dev

* commit 'a724d865':
  Fix incorrect looping limits.
parents 20dc4923 a724d865
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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) {