Removed android.R.attr#onTopLauncher

The product that the feature was intended for never launched, so
removing the complexity from the code base.

Test: builds
Change-Id: I75e60ee2da46f6012f03a6077f77bc6b9acecad5
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 92cb709..9a8eff0 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -397,14 +397,6 @@
     public static final int FLAG_ALWAYS_FOCUSABLE = 0x40000;
 
     /**
-     * Bit in {@link #flags} indicating if the activity is a launcher activity which should always
-     * show up on the top of others.
-     * See android.R.attr#onTopLauncher.
-     * @hide
-     */
-    public static final int FLAG_ON_TOP_LAUNCHER = 0x80000;
-
-    /**
      * Bit in {@link #flags} indicating if the activity is visible to ephemeral applications.
      * @hide
      */
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index ff928a0..53bd094 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -17,7 +17,6 @@
 package android.content.pm;
 
 import static android.content.pm.ActivityInfo.FLAG_ALWAYS_FOCUSABLE;
-import static android.content.pm.ActivityInfo.FLAG_ON_TOP_LAUNCHER;
 import static android.content.pm.ActivityInfo.FLAG_SUPPORTS_PICTURE_IN_PICTURE;
 import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZABLE_LANDSCAPE_ONLY;
 import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZABLE_PORTRAIT_ONLY;
@@ -4105,10 +4104,6 @@
                 a.info.flags |= FLAG_ALWAYS_FOCUSABLE;
             }
 
-            if (sa.getBoolean(R.styleable.AndroidManifestActivity_onTopLauncher, false)) {
-                a.info.flags |= FLAG_ON_TOP_LAUNCHER;
-            }
-
             a.info.lockTaskLaunchMode =
                     sa.getInt(R.styleable.AndroidManifestActivity_lockTaskMode, 0);
 
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 6d0fdb6..0850b8a 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -2050,9 +2050,6 @@
              in a task/stack that isn't focusable. This flag allows them to be focusable.-->
         <attr name="alwaysFocusable" format="boolean" />
         <attr name="enableVrMode" />
-        <!-- @hide This activity is a launcher which should always show up on the top of others.
-             This attribute is ignored if the activity isn't a launcher. -->
-        <attr name="onTopLauncher" format="boolean" />
         <attr name="rotationAnimation" />
         <attr name="visibleToInstantApps" />
         <!-- The code for this component is located in the given split. -->
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 10d108b..ba25120 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -1554,38 +1554,6 @@
         final ActivityStack focusedStack = mStackSupervisor.getFocusedStack();
         final int focusedStackId = focusedStack.mStackId;
 
-        final TaskRecord topFocusedTask = focusedStack.topTask();
-        final boolean isOnTopLauncherFocused = topFocusedTask != null &&
-                topFocusedTask.isOnTopLauncher();
-        if (isOnTopLauncherFocused) {
-            // When an on-top launcher is focused, we should find out whether the freeform stack or
-            // the fullscreen stack appears first underneath and has activities to show, and then
-            // make it visible.
-            boolean behindFullscreenOrFreeForm = false;
-            for (int stackBehindFocusedIndex = mStacks.indexOf(focusedStack) - 1;
-                 stackBehindFocusedIndex >= 0; stackBehindFocusedIndex--) {
-                ActivityStack stack = mStacks.get(stackBehindFocusedIndex);
-                if ((stack.mStackId == FREEFORM_WORKSPACE_STACK_ID
-                        || stack.mStackId == FULLSCREEN_WORKSPACE_STACK_ID)
-                        && stack.topRunningActivityLocked() != null) {
-                    if (stackIndex == stackBehindFocusedIndex) {
-                        return !behindFullscreenOrFreeForm ? STACK_VISIBLE : STACK_INVISIBLE;
-                    }
-                    behindFullscreenOrFreeForm = true;
-                }
-            }
-        }
-        // If an on-top launcher is on the top of the home stack but the home stack is not focused,
-        // then the whole stack should be invisible.
-        TaskRecord topTask = topTask();
-        if (mStackId != focusedStackId && topTask != null && topTask.isOnTopLauncher()) {
-            // We're here mostly because the on-top launcher didn't have a chance to move itself to
-            // back. We should move it to back as soon as possible to avoid other activities
-            // returning to it or other visibility issues.
-            moveTaskToBackLocked(topTask.taskId);
-            return STACK_INVISIBLE;
-        }
-
         if (mStackId == FULLSCREEN_WORKSPACE_STACK_ID
                 && hasVisibleBehindActivity() && StackId.isHomeOrRecentsStack(focusedStackId)
                 && !focusedStack.topActivity().fullscreen) {
@@ -1790,28 +1758,7 @@
                     // status of an activity in a previous task affects other.
                     behindFullscreenActivity = stackVisibility == STACK_INVISIBLE;
                 } else if (mStackId == HOME_STACK_ID) {
-                    if (task.isOnTopLauncher()) {
-                        if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "On-top launcher: at " + task
-                                + " stackInvisible=" + stackInvisible
-                                + " behindFullscreenActivity=" + behindFullscreenActivity);
-                        // When an on-top launcher is visible, (e.g. it's on the top of the home stack),
-                        // other tasks in the home stack could be visible if and only if:
-                        // - some app is running in the docked stack;
-                        // - no app is running in either the fullscreen stack or the freefrom stack.
-                        final ActivityStack dockedStack = mStackSupervisor.getStack(DOCKED_STACK_ID);
-                        final ActivityStack fullscreenStack = mStackSupervisor.getStack(
-                                FULLSCREEN_WORKSPACE_STACK_ID);
-                        final ActivityStack freeformStack = mStackSupervisor.getStack(
-                                FREEFORM_WORKSPACE_STACK_ID);
-                        final boolean dockedStackEmpty = dockedStack == null ||
-                                dockedStack.topRunningActivityLocked() == null;
-                        final boolean fullscreenStackEmpty = fullscreenStack == null ||
-                                fullscreenStack.topRunningActivityLocked() == null;
-                        final boolean freeformStackEmpty = freeformStack == null ||
-                                freeformStack.topRunningActivityLocked() == null;
-                        behindFullscreenActivity = dockedStackEmpty || !fullscreenStackEmpty ||
-                                !freeformStackEmpty;
-                    } else if (task.isHomeTask()) {
+                    if (task.isHomeTask()) {
                         if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Home task: at " + task
                                 + " stackInvisible=" + stackInvisible
                                 + " behindFullscreenActivity=" + behindFullscreenActivity);
@@ -2699,14 +2646,7 @@
             ActivityStack lastStack = mStackSupervisor.getLastStack();
             final boolean fromHomeOrRecents = lastStack.isHomeOrRecentsStack();
             final TaskRecord topTask = lastStack.topTask();
-            final boolean fromOnTopLauncher = topTask != null && topTask.isOnTopLauncher();
-            if (fromOnTopLauncher) {
-                // Since an on-top launcher will is moved to back when tasks are launched from it,
-                // those tasks should first try to return to a non-home activity.
-                // This also makes sure that non-home activities are visible under a transparent
-                // non-home activity.
-                task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
-            } else if (!isHomeOrRecentsStack() && (fromHomeOrRecents || topTask() != task)) {
+            if (!isHomeOrRecentsStack() && (fromHomeOrRecents || topTask() != task)) {
                 // If it's a last task over home - we default to keep its return to type not to
                 // make underlying task focused when this one will be finished.
                 int returnToType = isLastTaskOverHome
@@ -4404,23 +4344,6 @@
         if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare to back transition: task=" + taskId);
 
         if (mStackId == HOME_STACK_ID && topTask().isHomeTask()) {
-            if (topTask().isOnTopLauncher()) {
-                // An on-top launcher doesn't affect the visibility of activities on other stacks
-                // behind it. So if we're moving an on-top launcher to the back, we want to move the
-                // focus to the next focusable stack and resume an activity there.
-                // Besides, when the docked stack is visible, we should also move the home stack to
-                // the back to avoid the recents pops up on top of a fullscreen or freeform
-                // activity.
-
-                // Move the home stack to back.
-                moveToBack(topTask());
-
-                // Resume an activity in the next focusable stack.
-                adjustFocusToNextFocusableStackLocked("moveTaskToBack");
-                mStackSupervisor.resumeFocusedStackTopActivityLocked();
-                return true;
-            }
-
             // For the case where we are moving the home task back and there is an activity visible
             // behind it on the fullscreen stack, we want to move the focus to the visible behind
             // activity to maintain order with what the user is seeing.
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index f5874af..d1606b4 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -1498,15 +1498,7 @@
 
     private void updateTaskReturnToType(
             TaskRecord task, int launchFlags, ActivityStack focusedStack) {
-        if (focusedStack != null && focusedStack.isHomeOrRecentsStack()
-                && focusedStack.topTask() != null && focusedStack.topTask().isOnTopLauncher()) {
-            // Since an on-top launcher will is moved to back when tasks are launched from it,
-            // those tasks should first try to return to a non-home activity.
-            // This also makes sure that non-home activities are visible under a transparent
-            // non-home activity.
-            task.setTaskToReturnTo(APPLICATION_ACTIVITY_TYPE);
-            return;
-        } else if ((launchFlags & (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME))
+        if ((launchFlags & (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME))
                 == (FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_TASK_ON_HOME)) {
             // Caller wants to appear on home activity.
             task.setTaskToReturnTo(HOME_ACTIVITY_TYPE);
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index 9e09cbb..e237e41 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -75,7 +75,6 @@
 import static android.app.ActivityManager.StackId.RECENTS_STACK_ID;
 import static android.content.Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
 import static android.content.Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS;
-import static android.content.pm.ActivityInfo.FLAG_ON_TOP_LAUNCHER;
 import static android.content.pm.ActivityInfo.FLAG_RELINQUISH_TASK_IDENTITY;
 import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_ALWAYS;
 import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_DEFAULT;
@@ -191,17 +190,15 @@
 
     int mResizeMode;        // The resize mode of this task and its activities.
                             // Based on the {@link ActivityInfo#resizeMode} of the root activity.
-    boolean mSupportsPictureInPicture;  // Whether or not this task and its activities support PiP.
-            // Based on the {@link ActivityInfo#FLAG_SUPPORTS_PICTURE_IN_PICTURE} flag of the root
-            // activity.
+    private boolean mSupportsPictureInPicture;  // Whether or not this task and its activities
+            // support PiP. Based on the {@link ActivityInfo#FLAG_SUPPORTS_PICTURE_IN_PICTURE} flag
+            // of the root activity.
     boolean mTemporarilyUnresizable; // Separate flag from mResizeMode used to suppress resize
                                      // changes on a temporary basis.
     private int mLockTaskMode;  // Which tasklock mode to launch this task in. One of
                                 // ActivityManager.LOCK_TASK_LAUNCH_MODE_*
     private boolean mPrivileged;    // The root activity application of this task holds
                                     // privileged permissions.
-    private boolean mIsOnTopLauncher; // Whether this task is an on-top launcher. See
-                                      // android.R.attr#onTopLauncher.
 
     /** Can't be put in lockTask mode. */
     final static int LOCK_TASK_AUTH_DONT_LOCK = 0;
@@ -424,8 +421,8 @@
         final Configuration overrideConfig = getOverrideConfiguration();
         mWindowContainerController = new TaskWindowContainerController(taskId, this,
                 getStack().getWindowContainerController(), userId, bounds, overrideConfig,
-                mResizeMode, mSupportsPictureInPicture, isHomeTask(), isOnTopLauncher(),
-                onTop, showForAllUsers, lastTaskDescription);
+                mResizeMode, mSupportsPictureInPicture, isHomeTask(), onTop, showForAllUsers,
+                lastTaskDescription);
     }
 
     void removeWindowContainer() {
@@ -688,7 +685,6 @@
         }
         mResizeMode = info.resizeMode;
         mSupportsPictureInPicture = info.supportsPictureInPicture();
-        mIsOnTopLauncher = (info.flags & FLAG_ON_TOP_LAUNCHER) != 0;
         mLockTaskMode = info.lockTaskLaunchMode;
         mPrivileged = (info.applicationInfo.privateFlags & PRIVATE_FLAG_PRIVILEGED) != 0;
         setLockTaskAuth();
@@ -1335,7 +1331,7 @@
      * @param bounds The bounds to be tested.
      * @return True if the requested bounds are okay for a resizing request.
      */
-    boolean canResizeToBounds(Rect bounds) {
+    private boolean canResizeToBounds(Rect bounds) {
         if (bounds == null || getStackId() != FREEFORM_WORKSPACE_STACK_ID) {
             // Note: If not on the freeform workspace, we ignore the bounds.
             return true;
@@ -1348,10 +1344,6 @@
                 && (mResizeMode != RESIZE_MODE_FORCE_RESIZABLE_LANDSCAPE_ONLY || landscape);
     }
 
-    boolean isOnTopLauncher() {
-        return isHomeTask() && mIsOnTopLauncher;
-    }
-
     /**
      * Find the activity in the history stack within the given task.  Returns
      * the index within the history at which it's found, or < 0 if not found.
diff --git a/services/core/java/com/android/server/wm/DockedStackDividerController.java b/services/core/java/com/android/server/wm/DockedStackDividerController.java
index 5a2ee9a..0a92a81 100644
--- a/services/core/java/com/android/server/wm/DockedStackDividerController.java
+++ b/services/core/java/com/android/server/wm/DockedStackDividerController.java
@@ -621,11 +621,7 @@
         final boolean homeVisible = homeTask.getTopVisibleAppToken() != null;
         final boolean homeBehind = (fullscreenStack != null && fullscreenStack.isVisible())
                 || (homeStack.hasMultipleTaskWithHomeTaskNotTop());
-        // If the home task is an on-top launcher, we don't want to minimize the docked stack.
-        // Instead we want everything underneath that was visible to remain visible.
-        // See android.R.attr#onTopLauncher.
-        final boolean isOnTopLauncher = homeStack.topTaskIsOnTopLauncher();
-        setMinimizedDockedStack(homeVisible && !homeBehind && !isOnTopLauncher, animate);
+        setMinimizedDockedStack(homeVisible && !homeBehind, animate);
     }
 
     private boolean isWithinDisplay(Task task) {
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index d96e1ef..ab9a378 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -91,20 +91,16 @@
 
     private boolean mHomeTask;
 
-    // Whether this task is an on-top launcher task, which is determined by the root activity.
-    private boolean mIsOnTopLauncher;
-
     private TaskDescription mTaskDescription;
 
     Task(int taskId, TaskStack stack, int userId, WindowManagerService service, Rect bounds,
-            Configuration overrideConfig, boolean isOnTopLauncher, int resizeMode,
-            boolean supportsPictureInPicture, boolean homeTask, TaskDescription taskDescription,
+            Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
+            boolean homeTask, TaskDescription taskDescription,
             TaskWindowContainerController controller) {
         mTaskId = taskId;
         mStack = stack;
         mUserId = userId;
         mService = service;
-        mIsOnTopLauncher = isOnTopLauncher;
         mResizeMode = resizeMode;
         mSupportsPictureInPicture = supportsPictureInPicture;
         mHomeTask = homeTask;
@@ -117,7 +113,7 @@
         return mStack != null ? mStack.getDisplayContent() : null;
     }
 
-    int getAdjustedAddPosition(int suggestedPosition) {
+    private int getAdjustedAddPosition(int suggestedPosition) {
         final int size = mChildren.size();
         if (suggestedPosition >= size) {
             return Math.min(size, suggestedPosition);
@@ -347,10 +343,6 @@
                 || mResizeMode == RESIZE_MODE_FORCE_RESIZABLE_PRESERVE_ORIENTATION;
     }
 
-    boolean isOnTopLauncher() {
-        return mIsOnTopLauncher;
-    }
-
     boolean cropWindowsToStackBounds() {
         return isResizeable();
     }
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index 538f0d9..a1c9c29 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -160,10 +160,6 @@
         return mChildren.size() > 1 && !mChildren.get(mChildren.size() - 1).isHomeTask();
     }
 
-    boolean topTaskIsOnTopLauncher() {
-        return mChildren.get(mChildren.size() - 1).isOnTopLauncher();
-    }
-
     /**
      * Set the bounds of the stack and its containing tasks.
      * @param stackBounds New stack bounds. Passing in null sets the bounds to fullscreen.
diff --git a/services/core/java/com/android/server/wm/TaskWindowContainerController.java b/services/core/java/com/android/server/wm/TaskWindowContainerController.java
index 11667c0..efc2e11 100644
--- a/services/core/java/com/android/server/wm/TaskWindowContainerController.java
+++ b/services/core/java/com/android/server/wm/TaskWindowContainerController.java
@@ -51,17 +51,17 @@
     public TaskWindowContainerController(int taskId, TaskWindowContainerListener listener,
             StackWindowController stackController, int userId, Rect bounds,
             Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
-            boolean homeTask, boolean isOnTopLauncher, boolean toTop, boolean showForAllUsers,
+            boolean homeTask, boolean toTop, boolean showForAllUsers,
             TaskDescription taskDescription) {
         this(taskId, listener, stackController, userId, bounds, overrideConfig, resizeMode,
-                supportsPictureInPicture, homeTask, isOnTopLauncher, toTop, showForAllUsers,
-                taskDescription, WindowManagerService.getInstance());
+                supportsPictureInPicture, homeTask, toTop, showForAllUsers, taskDescription,
+                WindowManagerService.getInstance());
     }
 
     public TaskWindowContainerController(int taskId, TaskWindowContainerListener listener,
             StackWindowController stackController, int userId, Rect bounds,
             Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
-            boolean homeTask, boolean isOnTopLauncher, boolean toTop, boolean showForAllUsers,
+            boolean homeTask, boolean toTop, boolean showForAllUsers,
             TaskDescription taskDescription, WindowManagerService service) {
         super(listener, service);
         mTaskId = taskId;
@@ -78,7 +78,7 @@
             }
             EventLog.writeEvent(WM_TASK_CREATED, taskId, stack.mStackId);
             final Task task = createTask(taskId, stack, userId, bounds, overrideConfig, resizeMode,
-                    supportsPictureInPicture, homeTask, isOnTopLauncher, taskDescription);
+                    supportsPictureInPicture, homeTask, taskDescription);
             final int position = toTop ? POSITION_TOP : POSITION_BOTTOM;
             stack.addTask(task, position, showForAllUsers, true /* moveParents */);
         }
@@ -87,9 +87,9 @@
     @VisibleForTesting
     Task createTask(int taskId, TaskStack stack, int userId, Rect bounds,
             Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
-            boolean homeTask, boolean isOnTopLauncher, TaskDescription taskDescription) {
-        return new Task(taskId, stack, userId, mService, bounds, overrideConfig, isOnTopLauncher,
-                resizeMode, supportsPictureInPicture, homeTask, taskDescription, this);
+            boolean homeTask, TaskDescription taskDescription) {
+        return new Task(taskId, stack, userId, mService, bounds, overrideConfig, resizeMode,
+                supportsPictureInPicture, homeTask, taskDescription, this);
     }
 
     @Override
diff --git a/services/core/java/com/android/server/wm/WindowLayersController.java b/services/core/java/com/android/server/wm/WindowLayersController.java
index e0c3d60..d56110c 100644
--- a/services/core/java/com/android/server/wm/WindowLayersController.java
+++ b/services/core/java/com/android/server/wm/WindowLayersController.java
@@ -59,7 +59,6 @@
     private ArrayDeque<WindowState> mPinnedWindows = new ArrayDeque<>();
     private ArrayDeque<WindowState> mDockedWindows = new ArrayDeque<>();
     private ArrayDeque<WindowState> mInputMethodWindows = new ArrayDeque<>();
-    private ArrayDeque<WindowState> mOnTopLauncherWindows = new ArrayDeque<>();
     private WindowState mDockDivider = null;
     private ArrayDeque<WindowState> mReplacingWindows = new ArrayDeque<>();
     private int mCurBaseLayer;
@@ -138,7 +137,6 @@
         mPinnedWindows.clear();
         mInputMethodWindows.clear();
         mDockedWindows.clear();
-        mOnTopLauncherWindows.clear();
         mReplacingWindows.clear();
         mDockDivider = null;
 
@@ -182,9 +180,6 @@
         if (task == null) {
             return;
         }
-        if (task.isOnTopLauncher()) {
-            mOnTopLauncherWindows.add(w);
-        }
         final TaskStack stack = task.mStack;
         if (stack == null) {
             return;
@@ -206,10 +201,6 @@
 
         layer = assignAndIncreaseLayerIfNeeded(mDockDivider, layer);
 
-        while (!mOnTopLauncherWindows.isEmpty()) {
-            layer = assignAndIncreaseLayerIfNeeded(mOnTopLauncherWindows.remove(), layer);
-        }
-
         // We know that we will be animating a relaunching window in the near future, which will
         // receive a z-order increase. We want the replaced window to immediately receive the same
         // treatment, e.g. to be above the dock divider.
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
index 4cad4e8..98ff0e2 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
@@ -78,8 +78,7 @@
         final Rect mInsetBounds = new Rect();
         boolean mFullscreenForTest = true;
         TaskWithBounds(Rect bounds) {
-            super(0, mStubStack, 0, sWm, null, null, false, 0, false, false, new TaskDescription(),
-                    null);
+            super(0, mStubStack, 0, sWm, null, null, 0, false, false, new TaskDescription(), null);
             mBounds = bounds;
         }
         @Override
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
index 7dec52d..bc85017 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
@@ -201,8 +201,8 @@
 
     /** Creates a {@link Task} and adds it to the specified {@link TaskStack}. */
     static Task createTaskInStack(TaskStack stack, int userId) {
-        final Task newTask = new Task(sNextTaskId++, stack, userId, sWm, null, EMPTY, false, 0,
-                false, false, new TaskDescription(), null);
+        final Task newTask = new Task(sNextTaskId++, stack, userId, sWm, null, EMPTY, 0, false,
+                false, new TaskDescription(), null);
         stack.addTask(newTask, POSITION_TOP);
         return newTask;
     }
@@ -283,12 +283,10 @@
         private boolean mIsAnimating = false;
 
         TestTask(int taskId, TaskStack stack, int userId, WindowManagerService service, Rect bounds,
-                Configuration overrideConfig, boolean isOnTopLauncher, int resizeMode,
-                boolean supportsPictureInPicture, boolean homeTask,
-                TaskWindowContainerController controller) {
-            super(taskId, stack, userId, service, bounds, overrideConfig, isOnTopLauncher,
-                    resizeMode, supportsPictureInPicture, homeTask, new TaskDescription(),
-                            controller);
+                Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
+                boolean homeTask, TaskWindowContainerController controller) {
+            super(taskId, stack, userId, service, bounds, overrideConfig, resizeMode,
+                    supportsPictureInPicture, homeTask, new TaskDescription(), controller);
         }
 
         boolean shouldDeferRemoval() {
@@ -339,17 +337,16 @@
                         }
                     }, stackController, 0 /* userId */, null /* bounds */,
                     EMPTY /* overrideConfig*/, RESIZE_MODE_UNRESIZEABLE,
-                    false /* supportsPictureInPicture */, false /* homeTask*/,
-                    false /* isOnTopLauncher */, true /* toTop*/, true /* showForAllUsers */,
-                    new TaskDescription(), sWm);
+                    false /* supportsPictureInPicture */, false /* homeTask*/, true /* toTop*/,
+                    true /* showForAllUsers */, new TaskDescription(), sWm);
         }
 
         @Override
         TestTask createTask(int taskId, TaskStack stack, int userId, Rect bounds,
                 Configuration overrideConfig, int resizeMode, boolean supportsPictureInPicture,
-                boolean homeTask, boolean isOnTopLauncher, TaskDescription taskDescription) {
-            return new TestTask(taskId, stack, userId, mService, bounds, overrideConfig,
-                    isOnTopLauncher, resizeMode, supportsPictureInPicture, homeTask, this);
+                boolean homeTask, TaskDescription taskDescription) {
+            return new TestTask(taskId, stack, userId, mService, bounds, overrideConfig, resizeMode,
+                    supportsPictureInPicture, homeTask, this);
         }
     }