From 5d23afa9e55d526cbf86042d8efbb69250f25038 Mon Sep 17 00:00:00 2001 From: Matthew Ng Date: Wed, 21 Jun 2017 16:16:24 -0700 Subject: [PATCH] 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 --- .../core/java/com/android/server/wm/AppWindowToken.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java index bd379344e18bc..8afc4fd6a8df6 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 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree // Update keyguard flags upon finishing relaunch. checkKeyguardFlagsChanged(); } - - updateAllDrawn(); } void clearRelaunching() { @@ -1344,6 +1342,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree } } + /** + * 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