Moving DisplayController to dagger

Separating various overrides to individual modules so that they can be reused in tests

Removing ContextualEduStatsManager and directly using SysUiProxy as all the usescases
are only in quickstep/
This avoids additional Module definition and delegation

Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I096459d638553991ed01766002b874589c6b976e
This commit is contained in:
Sunny Goyal
2025-01-13 15:56:26 -08:00
parent 8fa43b3bb1
commit 55dc2d1c31
27 changed files with 271 additions and 280 deletions
@@ -40,13 +40,11 @@ import com.android.launcher3.LauncherAnimUtils;
import com.android.launcher3.LauncherState;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.contextualeducation.ContextualEduStatsManager;
import com.android.launcher3.logger.LauncherAtom;
import com.android.launcher3.logging.StatsLogManager;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.util.FlingBlockCheck;
import com.android.launcher3.util.TouchController;
import com.android.systemui.contextualeducation.GestureType;
/**
* TouchController for handling state changes
@@ -390,7 +388,6 @@ public abstract class AbstractStateChangeTouchController
} else {
logReachedState(mToState);
}
updateContextualEduStats(targetState);
}
protected void goToTargetState(LauncherState targetState) {
@@ -406,18 +403,6 @@ public abstract class AbstractStateChangeTouchController
.setDuration(0).start();
}
private void updateContextualEduStats(LauncherState targetState) {
if (targetState == OVERVIEW) {
ContextualEduStatsManager.INSTANCE.get(
mLauncher).updateEduStats(mDetector.isTrackpadGesture(), GestureType.OVERVIEW);
} else if (targetState == ALL_APPS && !mDetector.isTrackpadGesture()) {
// Only update if it is touch gesture as trackpad gesture is not relevant for all apps
// which only provides keyboard education.
ContextualEduStatsManager.INSTANCE.get(
mLauncher).updateEduStats(/* isTrackpadGesture= */ false, GestureType.ALL_APPS);
}
}
private void logReachedState(LauncherState targetState) {
if (mStartState == targetState) {
return;