commit | b620af4612f7fd2806965be41c13b916cd97649e | [log] [tgz] |
---|---|---|
author | Vinit Nayak <peanutbutter@google.com> | Mon Aug 21 23:40:51 2023 +0000 |
committer | Vinit Nayak <peanutbutter@google.com> | Mon Aug 21 23:40:51 2023 +0000 |
tree | f3c98cf7258d0d4c99f7b47056dbe64e373f5f82 | |
parent | cdb5f1036bdf76558c8a966220d1bf9d34abd3dc [diff] |
Null out Activity in split controller Bug: 295225524 Change-Id: I59aaed3fca07d611088cec0a4bfafc658a151bb2
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index d74a13b..b736ed8 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
@@ -482,6 +482,10 @@ mDesktopVisibilityController.unregisterSystemUiListener(); } + if (mSplitSelectStateController != null) { + mSplitSelectStateController.onDestroy(); + } + super.onDestroy(); mHotseatPredictionController.destroy(); mSplitWithKeyboardShortcutController.onDestroy();
diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java index 2e1a62c..1d2902c 100644 --- a/quickstep/src/com/android/quickstep/RecentsActivity.java +++ b/quickstep/src/com/android/quickstep/RecentsActivity.java
@@ -393,7 +393,7 @@ super.onDestroy(); ACTIVITY_TRACKER.onActivityDestroyed(this); mActivityLaunchAnimationRunner = null; - + mSplitSelectStateController.onDestroy(); mTISBindHelper.onDestroy(); }
diff --git a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java index 0c89766..6d5aa16 100644 --- a/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java +++ b/quickstep/src/com/android/quickstep/util/SplitSelectStateController.java
@@ -113,7 +113,7 @@ public class SplitSelectStateController { private static final String TAG = "SplitSelectStateCtor"; - private final Context mContext; + private Context mContext; private final Handler mHandler; private final RecentsModel mRecentTasksModel; private final SplitAnimationController mSplitAnimationController; @@ -157,6 +157,10 @@ mSplitSelectDataHolder = new SplitSelectDataHolder(mContext); } + public void onDestroy() { + mContext = null; + } + /** * @param alreadyRunningTask if set to {@link android.app.ActivityTaskManager#INVALID_TASK_ID} * then @param intent will be used to launch the initial task