summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2019-03-26 09:28:08 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-03-26 09:28:08 +0000
commitdbe9e763fa853708b98f277736b46f49ac0e95e2 (patch)
tree51a7ff907ace352c40ead0efa8e044bc3d201f13
parentbb8954df3bc4d8f0b04231add412942bd86e8f51 (diff)
parentb9932b66e6933a316ce2d9636170171ac9eef7ab (diff)
Merge "DO NOT MERGE Fix CtsActivityManagerDeviceTestCases fails"
-rw-r--r--services/core/java/com/android/server/wm/DisplayContent.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 22ac65df4337..1fb28e1969a8 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -3703,13 +3703,19 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
.show(mSplitScreenDividerAnchor);
scheduleAnimation();
} else {
- mAppAnimationLayer.destroy();
+ // At this time mBoostedAppAnimationLayer may be used for animating,
+ // and ResizeableActivity is in it. mBoostedAppAnimationLayer.destroy()
+ // can also destroy the surface of ResizeableActivity, but the surface will
+ // be used after. So change to use transaction to call destroy to delay it,
+ // and ResizeableActivity is not in mBoostedAppAnimationLayer.
+ getPendingTransaction()
+ .destroy(mAppAnimationLayer)
+ .destroy(mBoostedAppAnimationLayer)
+ .destroy(mHomeAppAnimationLayer)
+ .destroy(mSplitScreenDividerAnchor);
mAppAnimationLayer = null;
- mBoostedAppAnimationLayer.destroy();
mBoostedAppAnimationLayer = null;
- mHomeAppAnimationLayer.destroy();
mHomeAppAnimationLayer = null;
- mSplitScreenDividerAnchor.destroy();
mSplitScreenDividerAnchor = null;
}
}