diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/Transition.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java index 881fdec4549e..bbafa25eac5b 100644 --- a/services/core/java/com/android/server/wm/Transition.java +++ b/services/core/java/com/android/server/wm/Transition.java @@ -1614,13 +1614,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { } } - // Take task snapshots before the animation so that we can capture IME before it gets - // transferred. If transition is transient, IME won't be moved during the transition and - // the tasks are still live, so we take the snapshot at the end of the transition instead. - if (mTransientLaunches == null) { - mController.mSnapshotController.onTransactionReady(mType, mTargets); - } - // This is non-null only if display has changes. It handles the visible windows that don't // need to be participated in the transition. for (int i = 0; i < mTargetDisplays.size(); ++i) { @@ -1671,6 +1664,16 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { reportStartReasonsToLogger(); + // Take snapshots for closing tasks/activities before the animation finished but after + // dispatching onTransitionReady, so IME (if there is) can be captured together and the + // time spent on snapshot won't delay the start of animation. Note that if this transition + // is transient (mTransientLaunches != null), the snapshot will be captured at the end of + // the transition, because IME won't move be moved during the transition and the tasks are + // still live. + if (mTransientLaunches == null) { + mController.mSnapshotController.onTransactionReady(mType, mTargets); + } + // Since we created root-leash but no longer reference it from core, release it now info.releaseAnimSurfaces(); |