summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorLouis Chang <louischang@google.com>2020-10-06 03:41:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-10-06 03:41:45 +0000
commit672024518fe68d0902dc9fdb25a3736fd3ea0aae (patch)
treed0e502526b8a1ff5306694303228c475f3661aef /core/java
parenta6a8d02b62bb71764eaeaeef6c889462450a000b (diff)
parentd1b79549d2dbb573cb791530be5af8faf01d6219 (diff)
Merge "Renaming Stacks APIs to RootTasks"
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/ActivityTaskManager.java38
-rw-r--r--core/java/android/app/IActivityManager.aidl10
-rw-r--r--core/java/android/app/IActivityTaskManager.aidl21
3 files changed, 32 insertions, 37 deletions
diff --git a/core/java/android/app/ActivityTaskManager.java b/core/java/android/app/ActivityTaskManager.java
index 3e4d5eee34fe..d0a0e30bad18 100644
--- a/core/java/android/app/ActivityTaskManager.java
+++ b/core/java/android/app/ActivityTaskManager.java
@@ -211,23 +211,23 @@ public class ActivityTaskManager {
}
/**
- * Removes stacks in the windowing modes from the system if they are of activity type
+ * Removes root tasks in the windowing modes from the system if they are of activity type
* ACTIVITY_TYPE_STANDARD or ACTIVITY_TYPE_UNDEFINED
*/
@RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
- public void removeStacksInWindowingModes(int[] windowingModes) throws SecurityException {
+ public void removeRootTasksInWindowingModes(@NonNull int[] windowingModes) {
try {
- getService().removeStacksInWindowingModes(windowingModes);
+ getService().removeRootTasksInWindowingModes(windowingModes);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
- /** Removes stack of the activity types from the system. */
+ /** Removes root tasks of the activity types from the system. */
@RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
- public void removeStacksWithActivityTypes(int[] activityTypes) throws SecurityException {
+ public void removeRootTasksWithActivityTypes(@NonNull int[] activityTypes) {
try {
- getService().removeStacksWithActivityTypes(activityTypes);
+ getService().removeRootTasksWithActivityTypes(activityTypes);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -310,15 +310,15 @@ public class ActivityTaskManager {
}
/**
- * Moves the top activity in the input stackId to the pinned stack.
- * @param stackId Id of stack to move the top activity to pinned stack.
- * @param bounds Bounds to use for pinned stack.
- * @return True if the top activity of stack was successfully moved to the pinned stack.
+ * Moves the top activity in the input rootTaskId to the pinned root task.
+ * @param rootTaskId Id of root task to move the top activity to pinned root task.
+ * @param bounds Bounds to use for pinned root task.
+ * @return True if the top activity of root task was successfully moved to the pinned root task.
*/
@RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
- public boolean moveTopActivityToPinnedStack(int stackId, Rect bounds) {
+ public boolean moveTopActivityToPinnedRootTask(int rootTaskId, @NonNull Rect bounds) {
try {
- return getService().moveTopActivityToPinnedStack(stackId, bounds);
+ return getService().moveTopActivityToPinnedRootTask(rootTaskId, bounds);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -350,15 +350,15 @@ public class ActivityTaskManager {
}
/**
- * Move task to stack with given id.
+ * Move task to root task with given id.
* @param taskId Id of the task to move.
- * @param stackId Id of the stack for task moving.
+ * @param rootTaskId Id of the rootTask for task moving.
* @param toTop Whether the given task should shown to top of stack.
*/
@RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
- public void moveTaskToStack(int taskId, int stackId, boolean toTop) {
+ public void moveTaskToRootTask(int taskId, int rootTaskId, boolean toTop) {
try {
- getService().moveTaskToStack(taskId, stackId, toTop);
+ getService().moveTaskToRootTask(taskId, rootTaskId, toTop);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
@@ -380,13 +380,13 @@ public class ActivityTaskManager {
/**
* Resize docked stack & its task to given stack & task bounds.
- * @param stackBounds Bounds to resize stack.
+ * @param rootTaskBounds Bounds to resize stack.
* @param taskBounds Bounds to resize task.
*/
@RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
- public void resizeDockedStack(Rect stackBounds, Rect taskBounds) {
+ public void resizePrimarySplitScreen(@NonNull Rect rootTaskBounds, @NonNull Rect taskBounds) {
try {
- getService().resizeDockedStack(stackBounds, taskBounds, null, null, null);
+ getService().resizePrimarySplitScreen(rootTaskBounds, taskBounds, null, null, null);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index 19951288c01f..357b26c3083d 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -447,9 +447,8 @@ interface IActivityManager {
void hang(in IBinder who, boolean allowRestart);
List<ActivityTaskManager.RootTaskInfo> getAllRootTaskInfos();
- @UnsupportedAppUsage
- void moveTaskToStack(int taskId, int stackId, boolean toTop);
- void setFocusedStack(int stackId);
+ void moveTaskToRootTask(int taskId, int rootTaskId, boolean toTop);
+ void setFocusedRootTask(int taskId);
ActivityTaskManager.RootTaskInfo getFocusedRootTaskInfo();
@UnsupportedAppUsage
void restart();
@@ -507,15 +506,12 @@ interface IActivityManager {
boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
@UnsupportedAppUsage
void suppressResizeConfigChanges(boolean suppress);
- @UnsupportedAppUsage
- boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
+ boolean moveTopActivityToPinnedRootTask(int rootTaskId, in Rect bounds);
boolean isAppStartModeDisabled(int uid, in String packageName);
@UnsupportedAppUsage
boolean unlockUser(int userid, in byte[] token, in byte[] secret,
in IProgressListener listener);
void killPackageDependents(in String packageName, int userId);
- @UnsupportedAppUsage
- void removeStack(int stackId);
void makePackageIdle(String packageName, int userId);
int getMemoryTrimLevel();
boolean isVrModePackageEnabled(in ComponentName packageName);
diff --git a/core/java/android/app/IActivityTaskManager.aidl b/core/java/android/app/IActivityTaskManager.aidl
index ddf2dc50b9c3..66007e5c17d6 100644
--- a/core/java/android/app/IActivityTaskManager.aidl
+++ b/core/java/android/app/IActivityTaskManager.aidl
@@ -186,11 +186,11 @@ interface IActivityTaskManager {
void reportAssistContextExtras(in IBinder token, in Bundle extras,
in AssistStructure structure, in AssistContent content, in Uri referrer);
- void setFocusedStack(int stackId);
+ void setFocusedRootTask(int taskId);
ActivityTaskManager.RootTaskInfo getFocusedRootTaskInfo();
Rect getTaskBounds(int taskId);
- void cancelRecentsAnimation(boolean restoreHomeStackPosition);
+ void cancelRecentsAnimation(boolean restoreHomeRootTaskPosition);
void startLockTaskModeByToken(in IBinder token);
void stopLockTaskModeByToken(in IBinder token);
void updateLockTaskPackages(int userId, in String[] packages);
@@ -239,8 +239,7 @@ interface IActivityTaskManager {
* @return Return true on success. Otherwise false.
*/
boolean resizeTask(int taskId, in Rect bounds, int resizeMode);
- void moveStackToDisplay(int stackId, int displayId);
- void removeStack(int stackId);
+ void moveRootTaskToDisplay(int taskId, int displayId);
/**
* Sets the windowing mode for a specific task. Only works on tasks of type
@@ -251,15 +250,15 @@ interface IActivityTaskManager {
* @return Whether the task was successfully put into the specified windowing mode.
*/
boolean setTaskWindowingMode(int taskId, int windowingMode, boolean toTop);
- void moveTaskToStack(int taskId, int stackId, boolean toTop);
+ void moveTaskToRootTask(int taskId, int rootTaskId, boolean toTop);
boolean setTaskWindowingModeSplitScreenPrimary(int taskId, boolean toTop);
/**
- * Removes stacks in the input windowing modes from the system if they are of activity type
+ * Removes root tasks in the input windowing modes from the system if they are of activity type
* ACTIVITY_TYPE_STANDARD or ACTIVITY_TYPE_UNDEFINED
*/
- void removeStacksInWindowingModes(in int[] windowingModes);
- /** Removes stack of the activity types from the system. */
- void removeStacksWithActivityTypes(in int[] activityTypes);
+ void removeRootTasksInWindowingModes(in int[] windowingModes);
+ /** Removes root tasks of the activity types from the system. */
+ void removeRootTasksWithActivityTypes(in int[] activityTypes);
List<ActivityTaskManager.RootTaskInfo> getAllRootTaskInfos();
ActivityTaskManager.RootTaskInfo getRootTaskInfo(int windowingMode, int activityType);
@@ -299,7 +298,7 @@ interface IActivityTaskManager {
in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations);
void suppressResizeConfigChanges(boolean suppress);
- boolean moveTopActivityToPinnedStack(int stackId, in Rect bounds);
+ boolean moveTopActivityToPinnedRootTask(int rootTaskId, in Rect bounds);
boolean enterPictureInPictureMode(in IBinder token, in PictureInPictureParams params);
void setPictureInPictureParams(in IBinder token, in PictureInPictureParams params);
void requestPictureInPictureMode(in IBinder token);
@@ -325,7 +324,7 @@ interface IActivityTaskManager {
* stacks.
* @throws RemoteException
*/
- void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds,
+ void resizePrimarySplitScreen(in Rect dockedBounds, in Rect tempDockedTaskBounds,
in Rect tempDockedTaskInsetBounds,
in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds);