Merge "Fix activity leak" into main
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
index e379b2a..c33e4cc 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
@@ -542,16 +542,18 @@
         if (mDesktopVisibilityController != null) {
             mDesktopVisibilityController.unregisterSystemUiListener();
         }
+        mDesktopVisibilityController = null;
 
         if (mSplitSelectStateController != null) {
+            removeBackAnimationCallback(mSplitSelectStateController.getSplitBackHandler());
             mSplitSelectStateController.onDestroy();
         }
+        mSplitSelectStateController = null;
 
         super.onDestroy();
         mHotseatPredictionController.destroy();
         mSplitWithKeyboardShortcutController.onDestroy();
         if (mViewCapture != null) mViewCapture.close();
-        removeBackAnimationCallback(mSplitSelectStateController.getSplitBackHandler());
     }
 
     @Override