summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityTaskManager.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2020-02-04 21:39:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-02-04 21:39:36 +0000
commit3d358dba3d5ae8675b6093e5f92d08b33aad7185 (patch)
tree7e90c0d517ad5ba1aa97402e75b16a58343df938 /core/java/android/app/ActivityTaskManager.java
parentf816b93b97e5ae902926e7f6486efe4b5536e8e3 (diff)
parent7ccc68114e30b41daad8582da1f21b907bed1b59 (diff)
Merge "Add lock task check when entering split screen"
Diffstat (limited to 'core/java/android/app/ActivityTaskManager.java')
-rw-r--r--core/java/android/app/ActivityTaskManager.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/java/android/app/ActivityTaskManager.java b/core/java/android/app/ActivityTaskManager.java
index 58bff7f4dc04..9ba56cf40161 100644
--- a/core/java/android/app/ActivityTaskManager.java
+++ b/core/java/android/app/ActivityTaskManager.java
@@ -182,12 +182,13 @@ public class ActivityTaskManager {
* @param taskId The id of the task to set the windowing mode for.
* @param windowingMode The windowing mode to set for the task.
* @param toTop If the task should be moved to the top once the windowing mode changes.
+ * @return Whether the task was successfully put into the specified windowing mode.
*/
@RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
- public void setTaskWindowingMode(int taskId, int windowingMode, boolean toTop)
+ public boolean setTaskWindowingMode(int taskId, int windowingMode, boolean toTop)
throws SecurityException {
try {
- getService().setTaskWindowingMode(taskId, windowingMode, toTop);
+ return getService().setTaskWindowingMode(taskId, windowingMode, toTop);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -208,13 +209,14 @@ public class ActivityTaskManager {
* 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_STACKS)
- public void setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop,
+ public boolean setTaskWindowingModeSplitScreenPrimary(int taskId, int createMode, boolean toTop,
boolean animate, Rect initialBounds, boolean showRecents) throws SecurityException {
try {
- getService().setTaskWindowingModeSplitScreenPrimary(taskId, createMode, toTop, animate,
- initialBounds, showRecents);
+ return getService().setTaskWindowingModeSplitScreenPrimary(taskId, createMode, toTop,
+ animate, initialBounds, showRecents);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}