Merge "Add minWidth, minHeight and minTaskSize to TaskInfo"

This commit is contained in:
Jorge Gil
2021-12-01 00:04:47 +00:00
committed by Android (Google) Code Review
2 changed files with 30 additions and 0 deletions

View File

@@ -218,6 +218,24 @@ public class TaskInfo {
*/
public boolean isResizeable;
/**
* Minimal width of the task when it's resizeable.
* @hide
*/
public int minWidth;
/**
* Minimal height of the task when it's resizeable.
* @hide
*/
public int minHeight;
/**
* The default minimal size of the task used when a minWidth or minHeight is not specified.
* @hide
*/
public int defaultMinSize;
/**
* Relative position of the task's top left corner in the parent container.
* @hide
@@ -419,6 +437,9 @@ public class TaskInfo {
displayCutoutInsets = source.readTypedObject(Rect.CREATOR);
topActivityInfo = source.readTypedObject(ActivityInfo.CREATOR);
isResizeable = source.readBoolean();
minWidth = source.readInt();
minHeight = source.readInt();
defaultMinSize = source.readInt();
source.readBinderList(launchCookies);
positionInParent = source.readTypedObject(Point.CREATOR);
parentTaskId = source.readInt();
@@ -459,6 +480,9 @@ public class TaskInfo {
dest.writeTypedObject(displayCutoutInsets, flags);
dest.writeTypedObject(topActivityInfo, flags);
dest.writeBoolean(isResizeable);
dest.writeInt(minWidth);
dest.writeInt(minHeight);
dest.writeInt(defaultMinSize);
dest.writeBinderList(launchCookies);
dest.writeTypedObject(positionInParent, flags);
dest.writeInt(parentTaskId);
@@ -484,6 +508,9 @@ public class TaskInfo {
+ " supportsMultiWindow=" + supportsMultiWindow
+ " resizeMode=" + resizeMode
+ " isResizeable=" + isResizeable
+ " minWidth=" + minWidth
+ " minHeight=" + minHeight
+ " defaultMinSize=" + defaultMinSize
+ " token=" + token
+ " topActivityType=" + topActivityType
+ " pictureInPictureParams=" + pictureInPictureParams

View File

@@ -3392,6 +3392,9 @@ class Task extends TaskFragment {
info.resizeMode = top != null ? top.mResizeMode : mResizeMode;
info.topActivityType = top.getActivityType();
info.isResizeable = isResizeable();
info.minWidth = mMinWidth;
info.minHeight = mMinHeight;
info.defaultMinSize = mRootWindowContainer.mDefaultMinSizeOfResizeableTaskDp;
info.positionInParent = getRelativePosition();