Merge "Fix the smallest width not updated while resolving override bounds" into tm-qpr-dev

This commit is contained in:
Louis Chang
2023-03-20 00:36:44 +00:00
committed by Android (Google) Code Review

View File

@@ -2243,8 +2243,8 @@ class TaskFragment extends WindowContainer<WindowContainer> {
// task, because they should not be affected by insets. // task, because they should not be affected by insets.
inOutConfig.smallestScreenWidthDp = (int) (0.5f inOutConfig.smallestScreenWidthDp = (int) (0.5f
+ Math.min(mTmpFullBounds.width(), mTmpFullBounds.height()) / density); + Math.min(mTmpFullBounds.width(), mTmpFullBounds.height()) / density);
} else if (windowingMode == WINDOWING_MODE_MULTI_WINDOW } else if (windowingMode == WINDOWING_MODE_MULTI_WINDOW && mIsEmbedded
&& isEmbeddedWithBoundsOverride()) { && insideParentBounds && !resolvedBounds.equals(parentBounds)) {
// For embedded TFs, the smallest width should be updated. Otherwise, inherit // For embedded TFs, the smallest width should be updated. Otherwise, inherit
// from the parent task would result in applications loaded wrong resource. // from the parent task would result in applications loaded wrong resource.
inOutConfig.smallestScreenWidthDp = inOutConfig.smallestScreenWidthDp =