Use correct task bounds after updating override config
Use new task bounds after updating override configuration
when we move existing task to front or launch new one.
This fixes issues when task with defined minimal size is
launched in freeform or split-screen modes. In these cases
minimal size was not applied until task was resized manually.
Bug: 27621228
Change-Id: I0630962578815a77bfb556150cb71fec5a74ee37
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index 4eae45c..cc5e687 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -1502,6 +1502,9 @@
Rect updateOverrideConfigurationFromLaunchBounds() {
final Rect bounds = validateBounds(getLaunchBounds());
updateOverrideConfiguration(bounds);
+ if (bounds != null) {
+ bounds.set(mBounds);
+ }
return bounds;
}