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

Commit ad2827ee authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Removing check preventing pinned stack tasks from matching by...

Merge "Merge "Removing check preventing pinned stack tasks from matching by affinity." into oc-dev am: 4ec5dd1d" into oc-dev-plus-aosp
parents 6ab4c986 6023bb4a
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);