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

Commit 1bc5d9b3 authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "Prevent early recent trimming of distinct documents."

parents 66969223 7cb57e19
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -462,10 +462,12 @@ class RecentTasks extends ArrayList<TaskRecord> {
                    final boolean sameActivity = task.realActivity != null
                            && tr.realActivity != null
                            && task.realActivity.equals(tr.realActivity);
                    if (!sameActivity) {
                    // If the document is open in another app or is not the same
                    // document, we don't need to trim it.
                    if (!sameActivity || !sameIntent) {
                        continue;
                    }
                    if (maxRecents > 0 && !doTrim) {
                    // Otherwise only trim if we are over our max recents for this task
                    } else if (maxRecents > 0 && !doTrim) {
                        --maxRecents;
                        continue;
                    }