diff options
| author | Winson Chung <winsonc@google.com> | 2020-02-04 21:39:36 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-02-04 21:39:36 +0000 |
| commit | 3d358dba3d5ae8675b6093e5f92d08b33aad7185 (patch) | |
| tree | 7e90c0d517ad5ba1aa97402e75b16a58343df938 /core/java/android | |
| parent | f816b93b97e5ae902926e7f6486efe4b5536e8e3 (diff) | |
| parent | 7ccc68114e30b41daad8582da1f21b907bed1b59 (diff) | |
Merge "Add lock task check when entering split screen"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/ActivityTaskManager.java | 12 | ||||
| -rw-r--r-- | core/java/android/app/IActivityTaskManager.aidl | 3 |
2 files changed, 9 insertions, 6 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(); } diff --git a/core/java/android/app/IActivityTaskManager.aidl b/core/java/android/app/IActivityTaskManager.aidl index 503f5c56c617..be2f144c2fe8 100644 --- a/core/java/android/app/IActivityTaskManager.aidl +++ b/core/java/android/app/IActivityTaskManager.aidl @@ -231,8 +231,9 @@ interface IActivityTaskManager { * @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. */ - void setTaskWindowingMode(int taskId, int windowingMode, boolean toTop); + boolean setTaskWindowingMode(int taskId, int windowingMode, boolean toTop); void moveTaskToStack(int taskId, int stackId, boolean toTop); /** * Resizes the input pinned stack to the given bounds with animation. |
