Removing RotationTouchHelper state management from RecentsAnimationDeviceState

RotationTouchHelper is a singleton and can manage its lifecycle statically

Bug: 386288280
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I3e3105ac982ec716d5e2ee10f459d3e1cf55cd0d
This commit is contained in:
Sunny Goyal
2024-12-26 21:08:26 -08:00
parent 239745aae9
commit 0e3948a5fd
30 changed files with 130 additions and 256 deletions
@@ -170,7 +170,6 @@ import com.android.launcher3.widget.LauncherWidgetHolder;
import com.android.quickstep.OverviewCommandHelper;
import com.android.quickstep.OverviewComponentObserver;
import com.android.quickstep.OverviewComponentObserver.OverviewChangeListener;
import com.android.quickstep.RecentsAnimationDeviceState;
import com.android.quickstep.RecentsModel;
import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.TaskUtils;
@@ -282,7 +281,6 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
getDepthController(), getStatsLogManager(),
systemUiProxy, RecentsModel.INSTANCE.get(this),
() -> onStateBack());
RecentsAnimationDeviceState deviceState = new RecentsAnimationDeviceState(asContext());
if (DesktopModeStatus.canEnterDesktopMode(this)) {
mDesktopRecentsTransitionController = new DesktopRecentsTransitionController(
getStateManager(), systemUiProxy, getIApplicationThread(),
@@ -290,8 +288,8 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
}
overviewPanel.init(mActionsView, mSplitSelectStateController,
mDesktopRecentsTransitionController);
mSplitWithKeyboardShortcutController = new SplitWithKeyboardShortcutController(this,
mSplitSelectStateController, deviceState);
mSplitWithKeyboardShortcutController = new SplitWithKeyboardShortcutController(
this, mSplitSelectStateController);
mSplitToWorkspaceController = new SplitToWorkspaceController(this,
mSplitSelectStateController);
mActionsView.updateDimension(getDeviceProfile(), overviewPanel.getLastComputedTaskSize());
@@ -566,7 +564,6 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
super.onDestroy();
mHotseatPredictionController.destroy();
mSplitWithKeyboardShortcutController.onDestroy();
if (mViewCapture != null) mViewCapture.close();
removeBackAnimationCallback(mSplitSelectStateController.getSplitBackHandler());
}