Change to use ConfigurationContainer.onParentChanged
Reduce duplicated code and also fix crash of WindowContainerTests
(testAddChildSetsSurfacePosition replaces the transaction factory)
by restoring the original surface transaction factory because the
WMS instance is shared.
Fixes: 123624626
Test: atest WindowContainerTests
Change-Id: Icf39aa074c2d91eda2ad07bd22e5ff751e48ba46
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 476bd6e..7a86c96 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -252,8 +252,8 @@
}
@Override
- void onParentSet() {
- super.onParentSet();
+ void onParentChanged() {
+ super.onParentChanged();
// Update task bounds if needed.
adjustBoundsForDisplayChangeIfNeeded(getDisplayContent());