OSDN Git Service

Clear references to animation runner when the animation ends.
authorWinson Chung <winsonc@google.com>
Mon, 7 May 2018 17:06:55 +0000 (10:06 -0700)
committerWinson Chung <winsonc@google.com>
Mon, 7 May 2018 17:06:55 +0000 (10:06 -0700)
Bug: 79322746
Test: Swipe up, ensure that there are no references from the system to the
      launcher animation runner

Change-Id: Ib0fd59c20ab9f9b24dfad732519d33c4a8a148e3

services/core/java/com/android/server/wm/RecentsAnimationController.java

index 85e4ac7..553b4fe 100644 (file)
@@ -79,7 +79,7 @@ public class RecentsAnimationController implements DeathRecipient {
     public @interface ReorderMode {}
 
     private final WindowManagerService mService;
-    private final IRecentsAnimationRunner mRunner;
+    private IRecentsAnimationRunner mRunner;
     private final RecentsAnimationCallbacks mCallbacks;
     private final ArrayList<TaskAnimationAdapter> mPendingAnimations = new ArrayList<>();
     private final int mDisplayId;
@@ -426,7 +426,10 @@ public class RecentsAnimationController implements DeathRecipient {
             removeAnimation(taskAdapter);
         }
 
+        // Clear references to the runner
         unlinkToDeathOfRunner();
+        mRunner = null;
+
         // Clear associated input consumers
         mService.mInputMonitor.updateInputWindowsLw(true /*force*/);
         mService.destroyInputConsumer(INPUT_CONSUMER_RECENTS_ANIMATION);