summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityTaskManager.java
diff options
context:
space:
mode:
authorRiddle Hsu <riddlehsu@google.com>2020-12-31 18:40:41 +0800
committerRiddle Hsu <riddlehsu@google.com>2020-12-31 20:36:03 +0800
commitb7132932c8a963fa08e5456a601faabca744acb5 (patch)
tree9c88551bb8f9f2c8ed491b59e74af75bad1fc175 /core/java/android/app/ActivityTaskManager.java
parent0883daddf17f142163d8ce934275796ecb5177ca (diff)
Remove IActivityTaskManager#setTaskWindowingModeSplitScreenPrimary
It is the same as setTaskWindowingMode(SPLIT_SCREEN_PRIMARY). Still keep ActivityTaskManager#setTaskWindowingModeSplitScreenPrimary that redirects to setTaskWindowingMode for simple usages. Remove SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT and SPLIT_SCREEN_CREATE_MODE_BOTTOM_OR_RIGHT because they are no longer used since commits bed2d1b, 4067a2d and 51beb14. Now if there needs the similar functionality, it should be done by organizer in shell. Remove the usage getNavBarPosition from StatusBar because it was used to determine the split side. The history about the removed fields: 59a73ca, f59a413. Bug: 174040691 Test: SplitScreenTests Change-Id: Ie5770d72cc5fb2f6ba1beceec418f1ea39f9c604
Diffstat (limited to 'core/java/android/app/ActivityTaskManager.java')
-rw-r--r--core/java/android/app/ActivityTaskManager.java36
1 files changed, 4 insertions, 32 deletions
diff --git a/core/java/android/app/ActivityTaskManager.java b/core/java/android/app/ActivityTaskManager.java
index 206025250018..fbc3b0d1753e 100644
--- a/core/java/android/app/ActivityTaskManager.java
+++ b/core/java/android/app/ActivityTaskManager.java
@@ -16,6 +16,8 @@
package android.app;
+import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
+
import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemService;
@@ -58,20 +60,6 @@ public class ActivityTaskManager {
public static final int INVALID_TASK_ID = -1;
/**
- * Parameter to {@link IActivityTaskManager#setTaskWindowingModeSplitScreenPrimary} which
- * specifies the position of the created docked stack at the top half of the screen if
- * in portrait mode or at the left half of the screen if in landscape mode.
- */
- public static final int SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT = 0;
-
- /**
- * Parameter to {@link IActivityTaskManager#setTaskWindowingModeSplitScreenPrimary} which
- * specifies the position of the created docked stack at the bottom half of the screen if
- * in portrait mode or at the right half of the screen if in landscape mode.
- */
- public static final int SPLIT_SCREEN_CREATE_MODE_BOTTOM_OR_RIGHT = 1;
-
- /**
* Input parameter to {@link IActivityTaskManager#resizeTask} which indicates
* that the resize doesn't need to preserve the window, and can be skipped if bounds
* is unchanged. This mode is used by window manager in most cases.
@@ -199,28 +187,12 @@ public class ActivityTaskManager {
/**
* Moves the input task to the primary-split-screen stack.
* @param taskId Id of task to move.
- * @param createMode The mode the primary split screen stack should be created in if it doesn't
- * exist already. See
- * {@link ActivityTaskManager#SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT}
- * and
- * {@link android.app.ActivityManager
- * #SPLIT_SCREEN_CREATE_MODE_BOTTOM_OR_RIGHT}
* @param toTop If the task and stack should be moved to the top.
- * @param animate Whether we should play an animation for the moving the task
- * @param initialBounds If the primary stack gets created, it will use these bounds for the
- * docked stack. Pass {@code null} to use default bounds.
- * @param showRecents If the recents activity should be shown on the other side of the task
- * going into split-screen mode.
* @return Whether the task was successfully put into splitscreen.
*/
@RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_TASKS)
- public boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop,
- boolean animate, Rect initialBounds, boolean showRecents) throws SecurityException {
- try {
- return getService().setTaskWindowingModeSplitScreenPrimary(taskId, toTop);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
+ public boolean setTaskWindowingModeSplitScreenPrimary(int taskId, boolean toTop) {
+ return setTaskWindowingMode(taskId, WINDOWING_MODE_SPLIT_SCREEN_PRIMARY, toTop);
}
/**