diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java index 128c259926c7e..40315f98a98f0 100644 --- a/services/core/java/com/android/server/wm/RecentsAnimationController.java +++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java @@ -996,7 +996,7 @@ public class RecentsAnimationController implements DeathRecipient { .setWindowCrop(taskSurface, mFinishBounds.width(), mFinishBounds.height()) .apply(); mFinishBounds.setEmpty(); - } else { + } else if (!mTask.isAttached()) { // Apply the task's pending transaction in case it is detached and its transaction // is not reachable. mTask.getPendingTransaction().apply();