Merge "Do not add divider to dismiss transition" into udc-dev am: eee7c25194

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23726379

Change-Id: I1c8c5949eb6ed2d01a46cda9c2a2a614629504eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java
index 64f7598..7699e2f 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java
@@ -2543,8 +2543,11 @@
             // handling to the mixed-handler to deal with splitting it up.
             if (mMixedHandler.animatePendingSplitWithDisplayChange(transition, info,
                     startTransaction, finishTransaction, finishCallback)) {
-                mSplitLayout.update(startTransaction);
-                startTransaction.apply();
+                if (mSplitTransitions.isPendingResize(transition)) {
+                    // Only need to update in resize because divider exist before transition.
+                    mSplitLayout.update(startTransaction);
+                    startTransaction.apply();
+                }
                 return true;
             }
         }
@@ -2913,8 +2916,6 @@
             mSideStage.getSplitDecorManager().release(callbackT);
             callbackWct.setReparentLeafTaskIfRelaunch(mRootTaskInfo.token, false);
         });
-
-        addDividerBarToTransition(info, false /* show */);
         return true;
     }