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

Commit 7a0fa2c8 authored by Louis Chang's avatar Louis Chang Committed by Gerrit Code Review
Browse files

Merge "Allow ACTIVITY_TYPE_RECENTS to have multiple root tasks" into main

parents cdf207b2 de4bebe5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -6510,11 +6510,11 @@ class Task extends TaskFragment {
                mActivityType = ACTIVITY_TYPE_STANDARD;
            }

            if (mActivityType != ACTIVITY_TYPE_STANDARD
            if (!DisplayContent.alwaysCreateRootTask(tda.getWindowingMode(), mActivityType)
                    && mActivityType != ACTIVITY_TYPE_UNDEFINED) {
                // For now there can be only one root task of a particular non-standard activity
                // type on a display. So, get that ignoring whatever windowing mode it is
                // currently in.
                // Only Recents or Standard activity types are allowed to have more than one
                // root task on a display, this is independent of whatever windowing mode it
                // is currently in.
                Task rootTask = tda.getRootTask(WINDOWING_MODE_UNDEFINED, mActivityType);
                if (rootTask != null) {
                    throw new IllegalArgumentException("Root task=" + rootTask + " of activityType="