From a1762666518aa6ca521c591ac28c0f0814ca97a9 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Thu, 10 Dec 2020 21:55:03 +0000 Subject: [PATCH] Only apply the task's pending transaction if it is detached This fixes a flicker introduced by 88fbccf which may incorrectly apply the display content's pending transaction instead of the task's. Test: go/wm-smoke Test: app to recents, see no flicker Change-Id: If0a0431b2ea170ea833c1445599f0fdb9431dabf --- .../java/com/android/server/wm/RecentsAnimationController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();