From ec533f6a55cfe3b3fdc43f2cdd2305d952a2437b Mon Sep 17 00:00:00 2001 From: Wale Ogunwale Date: Fri, 5 Dec 2014 09:03:48 -0800 Subject: [PATCH] Don't destroy surfaces of activities launched behind early. When the launch activity behind feature was introduced in http://ag/502868, we destroy the surfaces of windows associated with the activity early in the last app window animation step. The causes issues with activities that might be using the surface and not prepared to have the surface destroyed from underneath them. We now let the surface destruction get handled like any other window so all the components/processes interested in the surface can be in the right state when the surface is destroyed. Bug: 18325222 Change-Id: I45e834a07a199b8a9e364f7392db99c871a43280 --- .../java/com/android/server/wm/AppWindowAnimator.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/services/core/java/com/android/server/wm/AppWindowAnimator.java b/services/core/java/com/android/server/wm/AppWindowAnimator.java index bf96ea568bfa2..5c81126ac87d5 100644 --- a/services/core/java/com/android/server/wm/AppWindowAnimator.java +++ b/services/core/java/com/android/server/wm/AppWindowAnimator.java @@ -308,13 +308,9 @@ public class AppWindowAnimator { transformation.clear(); - final int N = mAllAppWinAnimators.size(); - for (int i=0; i