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

Commit 6023bb4a authored by Winson Chung's avatar Winson Chung Committed by android-build-merger
Browse files

Merge "Removing check preventing pinned stack tasks from matching by affinity." into oc-dev

am: 4ec5dd1d

Change-Id: I72050ea3a1a6d2345d1f511cad2f048b4224c63c
parents 711016df 4ec5dd1d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -987,7 +987,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
                result.matchedByRootAffinity = false;
                break;
            } else if (!isDocument && !taskIsDocument
                    && result.r == null && task.canMatchRootAffinity()) {
                    && result.r == null && task.rootAffinity != null) {
                if (task.rootAffinity.equals(target.taskAffinity)) {
                    if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Found matching affinity candidate!");
                    // It is possible for multiple tasks to have the same root affinity especially
+4 −0
Original line number Diff line number Diff line
@@ -3043,11 +3043,15 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
                    if (!mTmpFindTaskResult.matchedByRootAffinity) {
                        return mTmpFindTaskResult.r;
                    } else if (mTmpFindTaskResult.r.getDisplayId() == displayId) {
                        // Note: since the traversing through the stacks is top down, the floating
                        // tasks should always have lower priority than any affinity-matching tasks
                        // in the fullscreen stacks
                        affinityMatch = mTmpFindTaskResult.r;
                    }
                }
            }
        }

        if (DEBUG_TASKS && affinityMatch == null) Slog.d(TAG_TASKS, "No task found");
        return affinityMatch;
    }
+0 −6
Original line number Diff line number Diff line
@@ -2225,12 +2225,6 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta
        return mLastNonFullscreenBounds;
    }

    boolean canMatchRootAffinity() {
        // We don't allow root affinity matching on the pinned stack as no other task should
        // be launching in it based on affinity.
        return rootAffinity != null && getStackId() != PINNED_STACK_ID;
    }

    void addStartingWindowsForVisibleActivities(boolean taskSwitch) {
        for (int activityNdx = mActivities.size() - 1; activityNdx >= 0; --activityNdx) {
            final ActivityRecord r = mActivities.get(activityNdx);