Fixes getting the wrong app transition going home after minimized (1/2)

This is a side affect from ag/2125707. When minimizing and unminimizing
back to home would cause the same affect in the bug, where the app
transition is from activity to activity and not app. The issue was a
"updateAllDrawn" is normally called at the end of the surface
transaction and therefore removing this call (that would run inbetween
the transaction) should fix prematurely calculating the app transition
before setting the wallpaper target.

Fixes: 62727547
Test: go/wm-smoke
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
CtsServicesHostTestCases
android.server.cts.ActivityManagerDockedStackTests#
testMinimizeAndUnminimizeThenGoingHome
Change-Id: Ia658cd7111ede386579eb5cd38c88c9e4a1bd312
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index bd37934..8afc4fd 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -937,8 +937,6 @@
             // Update keyguard flags upon finishing relaunch.
             checkKeyguardFlagsChanged();
         }
-
-        updateAllDrawn();
     }
 
     void clearRelaunching() {
@@ -1344,6 +1342,10 @@
         }
     }
 
+    /**
+     *  Determines if the token has finished drawing. This should only be called from
+     *  {@link DisplayContent#applySurfaceChangesTransaction}
+     */
     void updateAllDrawn() {
         if (!allDrawn) {
             // Number of drawn windows can be less when a window is being relaunched, wait for