Merge "Rename minWidth/Height attributes" into nyc-dev

am: 42b3acf9d3

* commit '42b3acf9d3eed15324bfa67e92ad751a10e45718':
  Rename minWidth/Height attributes

Change-Id: Id7d89884ea46b3900459af10f5b4a4b32139ddd8
This commit is contained in:
Andrii Kulian
2016-05-19 01:48:29 +00:00
committed by android-build-merger
13 changed files with 151 additions and 67 deletions

View File

@@ -861,8 +861,6 @@ package android {
field public static final int minResizeWidth = 16843669; // 0x1010395 field public static final int minResizeWidth = 16843669; // 0x1010395
field public static final int minSdkVersion = 16843276; // 0x101020c field public static final int minSdkVersion = 16843276; // 0x101020c
field public static final int minWidth = 16843071; // 0x101013f field public static final int minWidth = 16843071; // 0x101013f
field public static final int minimalHeight = 16844067; // 0x1010523
field public static final int minimalWidth = 16844022; // 0x10104f6
field public static final int minimumHorizontalAngle = 16843901; // 0x101047d field public static final int minimumHorizontalAngle = 16843901; // 0x101047d
field public static final int minimumVerticalAngle = 16843902; // 0x101047e field public static final int minimumVerticalAngle = 16843902; // 0x101047e
field public static final int mipMap = 16843725; // 0x10103cd field public static final int mipMap = 16843725; // 0x10103cd
@@ -9327,8 +9325,8 @@ package android.content.pm {
field public final int gravity; field public final int gravity;
field public final int height; field public final int height;
field public final float heightFraction; field public final float heightFraction;
field public final int minimalHeight; field public final int minHeight;
field public final int minimalWidth; field public final int minWidth;
field public final int width; field public final int width;
field public final float widthFraction; field public final float widthFraction;
} }

View File

@@ -1,3 +1,17 @@
package android {
public static final class R.attr {
field public static final int minimalHeight = 16844067; // 0x1010523
field public static final int minimalWidth = 16844022; // 0x10104f6
}
public static final class R.styleable {
field public static final int AndroidManifestLayout_minimalHeight = 6; // 0x6
field public static final int AndroidManifestLayout_minimalWidth = 5; // 0x5
}
}
package android.app { package android.app {
public class Notification implements android.os.Parcelable { public class Notification implements android.os.Parcelable {
@@ -483,3 +497,17 @@ package android.widget {
} }
package com.android.internal {
public static final class R.attr {
field public static final int minimalHeight = 16844067; // 0x1010523
field public static final int minimalWidth = 16844022; // 0x10104f6
}
public static final class R.styleable {
field public static final int AndroidManifestLayout_minimalHeight = 6; // 0x6
field public static final int AndroidManifestLayout_minimalWidth = 5; // 0x5
}
}

View File

@@ -967,8 +967,6 @@ package android {
field public static final int minResizeWidth = 16843669; // 0x1010395 field public static final int minResizeWidth = 16843669; // 0x1010395
field public static final int minSdkVersion = 16843276; // 0x101020c field public static final int minSdkVersion = 16843276; // 0x101020c
field public static final int minWidth = 16843071; // 0x101013f field public static final int minWidth = 16843071; // 0x101013f
field public static final int minimalHeight = 16844067; // 0x1010523
field public static final int minimalWidth = 16844022; // 0x10104f6
field public static final int minimumHorizontalAngle = 16843901; // 0x101047d field public static final int minimumHorizontalAngle = 16843901; // 0x101047d
field public static final int minimumVerticalAngle = 16843902; // 0x101047e field public static final int minimumVerticalAngle = 16843902; // 0x101047e
field public static final int mipMap = 16843725; // 0x10103cd field public static final int mipMap = 16843725; // 0x10103cd
@@ -9667,8 +9665,8 @@ package android.content.pm {
field public final int gravity; field public final int gravity;
field public final int height; field public final int height;
field public final float heightFraction; field public final float heightFraction;
field public final int minimalHeight; field public final int minHeight;
field public final int minimalWidth; field public final int minWidth;
field public final int width; field public final int width;
field public final float widthFraction; field public final float widthFraction;
} }

View File

@@ -1,3 +1,17 @@
package android {
public static final class R.attr {
field public static final int minimalHeight = 16844067; // 0x1010523
field public static final int minimalWidth = 16844022; // 0x10104f6
}
public static final class R.styleable {
field public static final int AndroidManifestLayout_minimalHeight = 6; // 0x6
field public static final int AndroidManifestLayout_minimalWidth = 5; // 0x5
}
}
package android.app { package android.app {
public class Notification implements android.os.Parcelable { public class Notification implements android.os.Parcelable {
@@ -481,3 +495,17 @@ package android.widget {
} }
package com.android.internal {
public static final class R.attr {
field public static final int minimalHeight = 16844067; // 0x1010523
field public static final int minimalWidth = 16844022; // 0x10104f6
}
public static final class R.styleable {
field public static final int AndroidManifestLayout_minimalHeight = 6; // 0x6
field public static final int AndroidManifestLayout_minimalWidth = 5; // 0x5
}
}

View File

@@ -861,8 +861,6 @@ package android {
field public static final int minResizeWidth = 16843669; // 0x1010395 field public static final int minResizeWidth = 16843669; // 0x1010395
field public static final int minSdkVersion = 16843276; // 0x101020c field public static final int minSdkVersion = 16843276; // 0x101020c
field public static final int minWidth = 16843071; // 0x101013f field public static final int minWidth = 16843071; // 0x101013f
field public static final int minimalHeight = 16844067; // 0x1010523
field public static final int minimalWidth = 16844022; // 0x10104f6
field public static final int minimumHorizontalAngle = 16843901; // 0x101047d field public static final int minimumHorizontalAngle = 16843901; // 0x101047d
field public static final int minimumVerticalAngle = 16843902; // 0x101047e field public static final int minimumVerticalAngle = 16843902; // 0x101047e
field public static final int mipMap = 16843725; // 0x10103cd field public static final int mipMap = 16843725; // 0x10103cd
@@ -9336,8 +9334,8 @@ package android.content.pm {
field public final int gravity; field public final int gravity;
field public final int height; field public final int height;
field public final float heightFraction; field public final float heightFraction;
field public final int minimalHeight; field public final int minHeight;
field public final int minimalWidth; field public final int minWidth;
field public final int width; field public final int width;
field public final float widthFraction; field public final float widthFraction;
} }

View File

@@ -1,3 +1,17 @@
package android {
public static final class R.attr {
field public static final int minimalHeight = 16844067; // 0x1010523
field public static final int minimalWidth = 16844022; // 0x10104f6
}
public static final class R.styleable {
field public static final int AndroidManifestLayout_minimalHeight = 6; // 0x6
field public static final int AndroidManifestLayout_minimalWidth = 5; // 0x5
}
}
package android.app { package android.app {
public class Notification implements android.os.Parcelable { public class Notification implements android.os.Parcelable {
@@ -483,3 +497,17 @@ package android.widget {
} }
package com.android.internal {
public static final class R.attr {
field public static final int minimalHeight = 16844067; // 0x1010523
field public static final int minimalWidth = 16844022; // 0x10104f6
}
public static final class R.styleable {
field public static final int AndroidManifestLayout_minimalHeight = 6; // 0x6
field public static final int AndroidManifestLayout_minimalWidth = 5; // 0x5
}
}

View File

@@ -944,8 +944,8 @@ public class ActivityInfo extends ComponentInfo
dest.writeInt(windowLayout.height); dest.writeInt(windowLayout.height);
dest.writeFloat(windowLayout.heightFraction); dest.writeFloat(windowLayout.heightFraction);
dest.writeInt(windowLayout.gravity); dest.writeInt(windowLayout.gravity);
dest.writeInt(windowLayout.minimalWidth); dest.writeInt(windowLayout.minWidth);
dest.writeInt(windowLayout.minimalHeight); dest.writeInt(windowLayout.minHeight);
} else { } else {
dest.writeInt(0); dest.writeInt(0);
} }
@@ -997,19 +997,19 @@ public class ActivityInfo extends ComponentInfo
* @attr ref android.R.styleable#AndroidManifestLayout_defaultWidth * @attr ref android.R.styleable#AndroidManifestLayout_defaultWidth
* @attr ref android.R.styleable#AndroidManifestLayout_defaultHeight * @attr ref android.R.styleable#AndroidManifestLayout_defaultHeight
* @attr ref android.R.styleable#AndroidManifestLayout_gravity * @attr ref android.R.styleable#AndroidManifestLayout_gravity
* @attr ref android.R.styleable#AndroidManifestLayout_minimalWidth * @attr ref android.R.styleable#AndroidManifestLayout_minWidth
* @attr ref android.R.styleable#AndroidManifestLayout_minimalHeight * @attr ref android.R.styleable#AndroidManifestLayout_minHeight
*/ */
public static final class WindowLayout { public static final class WindowLayout {
public WindowLayout(int width, float widthFraction, int height, float heightFraction, int gravity, public WindowLayout(int width, float widthFraction, int height, float heightFraction, int gravity,
int minimalWidth, int minimalHeight) { int minWidth, int minHeight) {
this.width = width; this.width = width;
this.widthFraction = widthFraction; this.widthFraction = widthFraction;
this.height = height; this.height = height;
this.heightFraction = heightFraction; this.heightFraction = heightFraction;
this.gravity = gravity; this.gravity = gravity;
this.minimalWidth = minimalWidth; this.minWidth = minWidth;
this.minimalHeight = minimalHeight; this.minHeight = minHeight;
} }
WindowLayout(Parcel source) { WindowLayout(Parcel source) {
@@ -1018,8 +1018,8 @@ public class ActivityInfo extends ComponentInfo
height = source.readInt(); height = source.readInt();
heightFraction = source.readFloat(); heightFraction = source.readFloat();
gravity = source.readInt(); gravity = source.readInt();
minimalWidth = source.readInt(); minWidth = source.readInt();
minimalHeight = source.readInt(); minHeight = source.readInt();
} }
/** /**
@@ -1069,9 +1069,9 @@ public class ActivityInfo extends ComponentInfo
* width, then the system will set the same minimal width on all other activities in the * width, then the system will set the same minimal width on all other activities in the
* task. It will also ignore any other minimal width attributes of non-root activities. * task. It will also ignore any other minimal width attributes of non-root activities.
* *
* @attr ref android.R.styleable#AndroidManifestLayout_minimalWidth * @attr ref android.R.styleable#AndroidManifestLayout_minWidth
*/ */
public final int minimalWidth; public final int minWidth;
/** /**
* Minimal height of activity in pixels to be able to display its content. * Minimal height of activity in pixels to be able to display its content.
@@ -1081,8 +1081,8 @@ public class ActivityInfo extends ComponentInfo
* height, then the system will set the same minimal height on all other activities in the * height, then the system will set the same minimal height on all other activities in the
* task. It will also ignore any other minimal height attributes of non-root activities. * task. It will also ignore any other minimal height attributes of non-root activities.
* *
* @attr ref android.R.styleable#AndroidManifestLayout_minimalHeight * @attr ref android.R.styleable#AndroidManifestLayout_minHeight
*/ */
public final int minimalHeight; public final int minHeight;
} }
} }

View File

@@ -3712,15 +3712,15 @@ public class PackageParser {
int gravity = sw.getInt( int gravity = sw.getInt(
com.android.internal.R.styleable.AndroidManifestLayout_gravity, com.android.internal.R.styleable.AndroidManifestLayout_gravity,
Gravity.CENTER); Gravity.CENTER);
int minimalWidth = sw.getDimensionPixelSize( int minWidth = sw.getDimensionPixelSize(
com.android.internal.R.styleable.AndroidManifestLayout_minimalWidth, com.android.internal.R.styleable.AndroidManifestLayout_minWidth,
-1); -1);
int minimalHeight = sw.getDimensionPixelSize( int minHeight = sw.getDimensionPixelSize(
com.android.internal.R.styleable.AndroidManifestLayout_minimalHeight, com.android.internal.R.styleable.AndroidManifestLayout_minHeight,
-1); -1);
sw.recycle(); sw.recycle();
a.info.windowLayout = new ActivityInfo.WindowLayout(width, widthFraction, a.info.windowLayout = new ActivityInfo.WindowLayout(width, widthFraction,
height, heightFraction, gravity, minimalWidth, minimalHeight); height, heightFraction, gravity, minWidth, minHeight);
} }
private Activity parseActivityAlias(Package owner, Resources res, private Activity parseActivityAlias(Package owner, Resources res,

View File

@@ -2281,6 +2281,8 @@
activities launched in the task. That is if the root activity of a task set minimal width, activities launched in the task. That is if the root activity of a task set minimal width,
then the system will set the same minimal width on all other activities in the task. It then the system will set the same minimal width on all other activities in the task. It
will also ignore any other minimal width attributes of non-root activities. --> will also ignore any other minimal width attributes of non-root activities. -->
<attr name="minWidth" format="dimension" />
<!-- @removed -->
<attr name="minimalWidth" format="dimension" /> <attr name="minimalWidth" format="dimension" />
<!-- Minimal height of the activity. <!-- Minimal height of the activity.
@@ -2288,6 +2290,8 @@
activities launched in the task. That is if the root activity of a task set minimal height, activities launched in the task. That is if the root activity of a task set minimal height,
then the system will set the same minimal height on all other activities in the task. It then the system will set the same minimal height on all other activities in the task. It
will also ignore any other minimal height attributes of non-root activities. --> will also ignore any other minimal height attributes of non-root activities. -->
<attr name="minHeight" format="dimension" />
<!-- @removed -->
<attr name="minimalHeight" format="dimension" /> <attr name="minimalHeight" format="dimension" />
</declare-styleable> </declare-styleable>

View File

@@ -2664,6 +2664,7 @@
<public type="attr" name="subMenuArrow" /> <public type="attr" name="subMenuArrow" />
<public type="attr" name="defaultWidth" /> <public type="attr" name="defaultWidth" />
<public type="attr" name="defaultHeight" /> <public type="attr" name="defaultHeight" />
<!-- @removed -->
<public type="attr" name="minimalWidth" /> <public type="attr" name="minimalWidth" />
<public type="attr" name="resizeableActivity" /> <public type="attr" name="resizeableActivity" />
<public type="attr" name="supportsPictureInPicture" /> <public type="attr" name="supportsPictureInPicture" />
@@ -2709,6 +2710,7 @@
<public type="attr" name="fillType" /> <public type="attr" name="fillType" />
<public type="attr" name="popupEnterTransition" /> <public type="attr" name="popupEnterTransition" />
<public type="attr" name="popupExitTransition" /> <public type="attr" name="popupExitTransition" />
<!-- @removed -->
<public type="attr" name="minimalHeight" /> <public type="attr" name="minimalHeight" />
<public type="attr" name="forceHasOverlappingRendering" /> <public type="attr" name="forceHasOverlappingRendering" />
<public type="attr" name="contentInsetStartWithNavigation" /> <public type="attr" name="contentInsetStartWithNavigation" />

View File

@@ -4923,8 +4923,8 @@ final class ActivityStack {
" Task id #" + task.taskId + "\n" + " Task id #" + task.taskId + "\n" +
" mFullscreen=" + task.mFullscreen + "\n" + " mFullscreen=" + task.mFullscreen + "\n" +
" mBounds=" + task.mBounds + "\n" + " mBounds=" + task.mBounds + "\n" +
" mMinimalWidth=" + task.mMinimalWidth + "\n" + " mMinWidth=" + task.mMinWidth + "\n" +
" mMinimalHeight=" + task.mMinimalHeight + "\n" + " mMinHeight=" + task.mMinHeight + "\n" +
" mLastNonFullscreenBounds=" + task.mLastNonFullscreenBounds); " mLastNonFullscreenBounds=" + task.mLastNonFullscreenBounds);
if (printed) { if (printed) {
header = null; header = null;

View File

@@ -409,7 +409,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
// The default minimal size that will be used if the activity doesn't specify its minimal size. // The default minimal size that will be used if the activity doesn't specify its minimal size.
// It will be calculated when the default display gets added. // It will be calculated when the default display gets added.
int mDefaultMinimalSizeOfResizeableTask = -1; int mDefaultMinSizeOfResizeableTask = -1;
// Whether tasks have moved and we need to rank the tasks before next OOM scoring // Whether tasks have moved and we need to rank the tasks before next OOM scoring
private boolean mTaskLayersChanged = true; private boolean mTaskLayersChanged = true;
@@ -3375,7 +3375,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
} }
private void calculateDefaultMinimalSizeOfResizeableTasks(ActivityDisplay display) { private void calculateDefaultMinimalSizeOfResizeableTasks(ActivityDisplay display) {
mDefaultMinimalSizeOfResizeableTask = mDefaultMinSizeOfResizeableTask =
mService.mContext.getResources().getDimensionPixelSize( mService.mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.default_minimal_size_resizable_task); com.android.internal.R.dimen.default_minimal_size_resizable_task);
} }

View File

@@ -127,14 +127,14 @@ final class TaskRecord {
private static final String ATTR_RESIZE_MODE = "resize_mode"; private static final String ATTR_RESIZE_MODE = "resize_mode";
private static final String ATTR_PRIVILEGED = "privileged"; private static final String ATTR_PRIVILEGED = "privileged";
private static final String ATTR_NON_FULLSCREEN_BOUNDS = "non_fullscreen_bounds"; private static final String ATTR_NON_FULLSCREEN_BOUNDS = "non_fullscreen_bounds";
private static final String ATTR_MINIMAL_WIDTH = "minimal_width"; private static final String ATTR_MIN_WIDTH = "min_width";
private static final String ATTR_MINIMAL_HEIGHT = "minimal_height"; private static final String ATTR_MIN_HEIGHT = "min_height";
private static final String TASK_THUMBNAIL_SUFFIX = "_task_thumbnail"; private static final String TASK_THUMBNAIL_SUFFIX = "_task_thumbnail";
static final int INVALID_TASK_ID = -1; static final int INVALID_TASK_ID = -1;
static final int INVALID_MINIMAL_SIZE = -1; static final int INVALID_MIN_SIZE = -1;
final int taskId; // Unique identifier for this task. final int taskId; // Unique identifier for this task.
String affinity; // The affinity name for this task, or null; may change identity. String affinity; // The affinity name for this task, or null; may change identity.
@@ -260,8 +260,8 @@ final class TaskRecord {
Rect mLastNonFullscreenBounds = null; Rect mLastNonFullscreenBounds = null;
// Minimal width and height of this task when it's resizeable. -1 means it should use the // Minimal width and height of this task when it's resizeable. -1 means it should use the
// default minimal width/height. // default minimal width/height.
int mMinimalWidth; int mMinWidth;
int mMinimalHeight; int mMinHeight;
// Ranking (from top) of this task among all visible tasks. (-1 means it's not visible) // Ranking (from top) of this task among all visible tasks. (-1 means it's not visible)
// This number will be assigned when we evaluate OOM scores for all visible tasks. // This number will be assigned when we evaluate OOM scores for all visible tasks.
@@ -331,7 +331,7 @@ final class TaskRecord {
TaskThumbnailInfo lastThumbnailInfo, int taskAffiliation, int prevTaskId, TaskThumbnailInfo lastThumbnailInfo, int taskAffiliation, int prevTaskId,
int nextTaskId, int taskAffiliationColor, int callingUid, String callingPackage, int nextTaskId, int taskAffiliationColor, int callingUid, String callingPackage,
int resizeMode, boolean privileged, boolean _realActivitySuspended, int resizeMode, boolean privileged, boolean _realActivitySuspended,
boolean userSetupComplete, int minimalWidth, int minimalHeight) { boolean userSetupComplete, int minWidth, int minHeight) {
mService = service; mService = service;
mFilename = String.valueOf(_taskId) + TASK_THUMBNAIL_SUFFIX + mFilename = String.valueOf(_taskId) + TASK_THUMBNAIL_SUFFIX +
TaskPersister.IMAGE_EXTENSION; TaskPersister.IMAGE_EXTENSION;
@@ -371,8 +371,8 @@ final class TaskRecord {
mCallingPackage = callingPackage; mCallingPackage = callingPackage;
mResizeMode = resizeMode; mResizeMode = resizeMode;
mPrivileged = privileged; mPrivileged = privileged;
mMinimalWidth = minimalWidth; mMinWidth = minWidth;
mMinimalHeight = minimalHeight; mMinHeight = minHeight;
} }
void touchActiveTime() { void touchActiveTime() {
@@ -481,11 +481,11 @@ final class TaskRecord {
/** Sets the original minimal width and height. */ /** Sets the original minimal width and height. */
private void setMinDimensions(ActivityInfo info) { private void setMinDimensions(ActivityInfo info) {
if (info != null && info.windowLayout != null) { if (info != null && info.windowLayout != null) {
mMinimalWidth = info.windowLayout.minimalWidth; mMinWidth = info.windowLayout.minWidth;
mMinimalHeight = info.windowLayout.minimalHeight; mMinHeight = info.windowLayout.minHeight;
} else { } else {
mMinimalWidth = INVALID_MINIMAL_SIZE; mMinWidth = INVALID_MIN_SIZE;
mMinimalHeight = INVALID_MINIMAL_SIZE; mMinHeight = INVALID_MIN_SIZE;
} }
} }
@@ -1180,8 +1180,8 @@ final class TaskRecord {
out.attribute( out.attribute(
null, ATTR_NON_FULLSCREEN_BOUNDS, mLastNonFullscreenBounds.flattenToString()); null, ATTR_NON_FULLSCREEN_BOUNDS, mLastNonFullscreenBounds.flattenToString());
} }
out.attribute(null, ATTR_MINIMAL_WIDTH, String.valueOf(mMinimalWidth)); out.attribute(null, ATTR_MIN_WIDTH, String.valueOf(mMinWidth));
out.attribute(null, ATTR_MINIMAL_HEIGHT, String.valueOf(mMinimalHeight)); out.attribute(null, ATTR_MIN_HEIGHT, String.valueOf(mMinHeight));
if (affinityIntent != null) { if (affinityIntent != null) {
out.startTag(null, TAG_AFFINITYINTENT); out.startTag(null, TAG_AFFINITYINTENT);
@@ -1246,8 +1246,8 @@ final class TaskRecord {
int resizeMode = RESIZE_MODE_FORCE_RESIZEABLE; int resizeMode = RESIZE_MODE_FORCE_RESIZEABLE;
boolean privileged = false; boolean privileged = false;
Rect bounds = null; Rect bounds = null;
int minimalWidth = INVALID_MINIMAL_SIZE; int minWidth = INVALID_MIN_SIZE;
int minimalHeight = INVALID_MINIMAL_SIZE; int minHeight = INVALID_MIN_SIZE;
for (int attrNdx = in.getAttributeCount() - 1; attrNdx >= 0; --attrNdx) { for (int attrNdx = in.getAttributeCount() - 1; attrNdx >= 0; --attrNdx) {
final String attrName = in.getAttributeName(attrNdx); final String attrName = in.getAttributeName(attrNdx);
@@ -1315,10 +1315,10 @@ final class TaskRecord {
privileged = Boolean.valueOf(attrValue); privileged = Boolean.valueOf(attrValue);
} else if (ATTR_NON_FULLSCREEN_BOUNDS.equals(attrName)) { } else if (ATTR_NON_FULLSCREEN_BOUNDS.equals(attrName)) {
bounds = Rect.unflattenFromString(attrValue); bounds = Rect.unflattenFromString(attrValue);
} else if (ATTR_MINIMAL_WIDTH.equals(attrName)) { } else if (ATTR_MIN_WIDTH.equals(attrName)) {
minimalWidth = Integer.parseInt(attrValue); minWidth = Integer.parseInt(attrValue);
} else if (ATTR_MINIMAL_HEIGHT.equals(attrName)) { } else if (ATTR_MIN_HEIGHT.equals(attrName)) {
minimalHeight = Integer.parseInt(attrValue); minHeight = Integer.parseInt(attrValue);
} else { } else {
Slog.w(TAG, "TaskRecord: Unknown attribute=" + attrName); Slog.w(TAG, "TaskRecord: Unknown attribute=" + attrName);
} }
@@ -1379,7 +1379,7 @@ final class TaskRecord {
activities, firstActiveTime, lastActiveTime, lastTimeOnTop, neverRelinquishIdentity, activities, firstActiveTime, lastActiveTime, lastTimeOnTop, neverRelinquishIdentity,
taskDescription, thumbnailInfo, taskAffiliation, prevTaskId, nextTaskId, taskDescription, thumbnailInfo, taskAffiliation, prevTaskId, nextTaskId,
taskAffiliationColor, callingUid, callingPackage, resizeMode, privileged, taskAffiliationColor, callingUid, callingPackage, resizeMode, privileged,
realActivitySuspended, userSetupComplete, minimalWidth, minimalHeight); realActivitySuspended, userSetupComplete, minWidth, minHeight);
task.updateOverrideConfiguration(bounds); task.updateOverrideConfiguration(bounds);
for (int activityNdx = activities.size() - 1; activityNdx >=0; --activityNdx) { for (int activityNdx = activities.size() - 1; activityNdx >=0; --activityNdx) {
@@ -1394,41 +1394,41 @@ final class TaskRecord {
if (bounds == null) { if (bounds == null) {
return; return;
} }
int minimalWidth = mMinimalWidth; int minWidth = mMinWidth;
int minimalHeight = mMinimalHeight; int minHeight = mMinHeight;
// If the task has no requested minimal size, we'd like to enforce a minimal size // If the task has no requested minimal size, we'd like to enforce a minimal size
// so that the user can not render the task too small to manipulate. We don't need // so that the user can not render the task too small to manipulate. We don't need
// to do this for the pinned stack as the bounds are controlled by the system. // to do this for the pinned stack as the bounds are controlled by the system.
if (stack.mStackId != PINNED_STACK_ID) { if (stack.mStackId != PINNED_STACK_ID) {
if (minimalWidth == INVALID_MINIMAL_SIZE) { if (minWidth == INVALID_MIN_SIZE) {
minimalWidth = mService.mStackSupervisor.mDefaultMinimalSizeOfResizeableTask; minWidth = mService.mStackSupervisor.mDefaultMinSizeOfResizeableTask;
} }
if (minimalHeight == INVALID_MINIMAL_SIZE) { if (minHeight == INVALID_MIN_SIZE) {
minimalHeight = mService.mStackSupervisor.mDefaultMinimalSizeOfResizeableTask; minHeight = mService.mStackSupervisor.mDefaultMinSizeOfResizeableTask;
} }
} }
final boolean adjustWidth = minimalWidth > bounds.width(); final boolean adjustWidth = minWidth > bounds.width();
final boolean adjustHeight = minimalHeight > bounds.height(); final boolean adjustHeight = minHeight > bounds.height();
if (!(adjustWidth || adjustHeight)) { if (!(adjustWidth || adjustHeight)) {
return; return;
} }
if (adjustWidth) { if (adjustWidth) {
if (mBounds != null && bounds.right == mBounds.right) { if (mBounds != null && bounds.right == mBounds.right) {
bounds.left = bounds.right - minimalWidth; bounds.left = bounds.right - minWidth;
} else { } else {
// Either left bounds match, or neither match, or the previous bounds were // Either left bounds match, or neither match, or the previous bounds were
// fullscreen and we default to keeping left. // fullscreen and we default to keeping left.
bounds.right = bounds.left + minimalWidth; bounds.right = bounds.left + minWidth;
} }
} }
if (adjustHeight) { if (adjustHeight) {
if (mBounds != null && bounds.bottom == mBounds.bottom) { if (mBounds != null && bounds.bottom == mBounds.bottom) {
bounds.top = bounds.bottom - minimalHeight; bounds.top = bounds.bottom - minHeight;
} else { } else {
// Either top bounds match, or neither match, or the previous bounds were // Either top bounds match, or neither match, or the previous bounds were
// fullscreen and we default to keeping top. // fullscreen and we default to keeping top.
bounds.bottom = bounds.top + minimalHeight; bounds.bottom = bounds.top + minHeight;
} }
} }
} }