Loading services/core/java/com/android/server/wm/ActivityStack.java +1 −2 Original line number Diff line number Diff line Loading @@ -4914,7 +4914,6 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai // Update override configurations of all tasks in the stack. final Rect taskBounds = tempTaskBounds != null ? tempTaskBounds : bounds; final Rect insetBounds = tempTaskInsetBounds != null ? tempTaskInsetBounds : taskBounds; mTmpBounds.clear(); mTmpInsetBounds.clear(); Loading @@ -4922,7 +4921,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai for (int i = mTaskHistory.size() - 1; i >= 0; i--) { final TaskRecord task = mTaskHistory.get(i); if (task.isResizeable()) { task.updateOverrideConfiguration(taskBounds, insetBounds); task.updateOverrideConfiguration(taskBounds, tempTaskInsetBounds); } if (task.hasDisplayedBounds()) { Loading services/core/java/com/android/server/wm/TaskRecord.java +8 −5 Original line number Diff line number Diff line Loading @@ -1716,7 +1716,7 @@ class TaskRecord extends ConfigurationContainer { updateTaskDescription(); } private void adjustForMinimalTaskDimensions(Rect bounds) { private void adjustForMinimalTaskDimensions(Rect bounds, Rect previousBounds) { if (bounds == null) { return; } Loading Loading @@ -1747,9 +1747,8 @@ class TaskRecord extends ConfigurationContainer { return; } final Rect configBounds = getRequestedOverrideBounds(); if (adjustWidth) { if (!configBounds.isEmpty() && bounds.right == configBounds.right) { if (!previousBounds.isEmpty() && bounds.right == previousBounds.right) { bounds.left = bounds.right - minWidth; } else { // Either left bounds match, or neither match, or the previous bounds were Loading @@ -1758,7 +1757,7 @@ class TaskRecord extends ConfigurationContainer { } } if (adjustHeight) { if (!configBounds.isEmpty() && bounds.bottom == configBounds.bottom) { if (!previousBounds.isEmpty() && bounds.bottom == previousBounds.bottom) { bounds.top = bounds.bottom - minHeight; } else { // Either top bounds match, or neither match, or the previous bounds were Loading Loading @@ -2113,11 +2112,15 @@ class TaskRecord extends ConfigurationContainer { // TODO(b/113900640): remove this once ActivityRecord is changed to not need it anymore. void computeResolvedOverrideConfiguration(Configuration inOutConfig, Configuration parentConfig, Configuration overrideConfig) { // Save previous bounds because adjustForMinimalTaskDimensions uses that to determine if it // changes left bound vs. right bound, or top bound vs. bottom bound. mTmpBounds.set(inOutConfig.windowConfiguration.getBounds()); inOutConfig.setTo(overrideConfig); Rect outOverrideBounds = inOutConfig.windowConfiguration.getBounds(); if (outOverrideBounds != null && !outOverrideBounds.isEmpty()) { adjustForMinimalTaskDimensions(outOverrideBounds); adjustForMinimalTaskDimensions(outOverrideBounds, mTmpBounds); int windowingMode = overrideConfig.windowConfiguration.getWindowingMode(); if (windowingMode == WINDOWING_MODE_UNDEFINED) { Loading Loading
services/core/java/com/android/server/wm/ActivityStack.java +1 −2 Original line number Diff line number Diff line Loading @@ -4914,7 +4914,6 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai // Update override configurations of all tasks in the stack. final Rect taskBounds = tempTaskBounds != null ? tempTaskBounds : bounds; final Rect insetBounds = tempTaskInsetBounds != null ? tempTaskInsetBounds : taskBounds; mTmpBounds.clear(); mTmpInsetBounds.clear(); Loading @@ -4922,7 +4921,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai for (int i = mTaskHistory.size() - 1; i >= 0; i--) { final TaskRecord task = mTaskHistory.get(i); if (task.isResizeable()) { task.updateOverrideConfiguration(taskBounds, insetBounds); task.updateOverrideConfiguration(taskBounds, tempTaskInsetBounds); } if (task.hasDisplayedBounds()) { Loading
services/core/java/com/android/server/wm/TaskRecord.java +8 −5 Original line number Diff line number Diff line Loading @@ -1716,7 +1716,7 @@ class TaskRecord extends ConfigurationContainer { updateTaskDescription(); } private void adjustForMinimalTaskDimensions(Rect bounds) { private void adjustForMinimalTaskDimensions(Rect bounds, Rect previousBounds) { if (bounds == null) { return; } Loading Loading @@ -1747,9 +1747,8 @@ class TaskRecord extends ConfigurationContainer { return; } final Rect configBounds = getRequestedOverrideBounds(); if (adjustWidth) { if (!configBounds.isEmpty() && bounds.right == configBounds.right) { if (!previousBounds.isEmpty() && bounds.right == previousBounds.right) { bounds.left = bounds.right - minWidth; } else { // Either left bounds match, or neither match, or the previous bounds were Loading @@ -1758,7 +1757,7 @@ class TaskRecord extends ConfigurationContainer { } } if (adjustHeight) { if (!configBounds.isEmpty() && bounds.bottom == configBounds.bottom) { if (!previousBounds.isEmpty() && bounds.bottom == previousBounds.bottom) { bounds.top = bounds.bottom - minHeight; } else { // Either top bounds match, or neither match, or the previous bounds were Loading Loading @@ -2113,11 +2112,15 @@ class TaskRecord extends ConfigurationContainer { // TODO(b/113900640): remove this once ActivityRecord is changed to not need it anymore. void computeResolvedOverrideConfiguration(Configuration inOutConfig, Configuration parentConfig, Configuration overrideConfig) { // Save previous bounds because adjustForMinimalTaskDimensions uses that to determine if it // changes left bound vs. right bound, or top bound vs. bottom bound. mTmpBounds.set(inOutConfig.windowConfiguration.getBounds()); inOutConfig.setTo(overrideConfig); Rect outOverrideBounds = inOutConfig.windowConfiguration.getBounds(); if (outOverrideBounds != null && !outOverrideBounds.isEmpty()) { adjustForMinimalTaskDimensions(outOverrideBounds); adjustForMinimalTaskDimensions(outOverrideBounds, mTmpBounds); int windowingMode = overrideConfig.windowConfiguration.getWindowingMode(); if (windowingMode == WINDOWING_MODE_UNDEFINED) { Loading