Merge "Null out Activity in split controller" into udc-qpr-dev am: 0989216160

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24503472

Change-Id: Icb070c092a4097015a20eabaa7d755f7f2e157bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Vinit Nayak
2023-08-23 17:52:53 +00:00
committed by Automerger Merge Worker
3 changed files with 10 additions and 2 deletions

View File

@@ -471,6 +471,10 @@ public class QuickstepLauncher extends Launcher {
mDesktopVisibilityController.unregisterSystemUiListener();
}
if (mSplitSelectStateController != null) {
mSplitSelectStateController.onDestroy();
}
super.onDestroy();
mHotseatPredictionController.destroy();
mSplitWithKeyboardShortcutController.onDestroy();

View File

@@ -393,7 +393,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
super.onDestroy();
ACTIVITY_TRACKER.onActivityDestroyed(this);
mActivityLaunchAnimationRunner = null;
mSplitSelectStateController.onDestroy();
mTISBindHelper.onDestroy();
}

View File

@@ -113,7 +113,7 @@ import java.util.function.Consumer;
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 @@ public class SplitSelectStateController {
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