mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Good riddance UserEventDispatcher
Bug: 165675920 Bug: 161381246 TL;DR;; - nano -> lite proto - add all the missing logs to WW - pin item related logging fix - Removed logging for assistant sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g' Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
This commit is contained in:
@@ -45,12 +45,9 @@ import com.android.launcher3.anim.PendingAnimation;
|
||||
import com.android.launcher3.compat.AccessibilityManagerCompat;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.graphics.OverviewScrim;
|
||||
import com.android.launcher3.logging.StatsLogManager;
|
||||
import com.android.launcher3.states.StateAnimationConfig;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.touch.SingleAxisSwipeDetector;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
|
||||
import com.android.launcher3.util.TouchController;
|
||||
import com.android.quickstep.util.AnimatorControllerWithResistance;
|
||||
import com.android.quickstep.util.AssistantUtilities;
|
||||
@@ -211,7 +208,6 @@ public class NavBarToHomeTouchController implements TouchController,
|
||||
@Override
|
||||
public void onDragEnd(float velocity) {
|
||||
boolean fling = mSwipeDetector.isFling(velocity);
|
||||
final int logAction = fling ? Touch.FLING : Touch.SWIPE;
|
||||
float progress = mCurrentAnimation.getProgressFraction();
|
||||
float interpolatedProgress = PULLBACK_INTERPOLATOR.getInterpolation(progress);
|
||||
boolean success = interpolatedProgress >= SUCCESS_TRANSITION_PROGRESS
|
||||
@@ -230,7 +226,7 @@ public class NavBarToHomeTouchController implements TouchController,
|
||||
() -> onSwipeInteractionCompleted(mEndState));
|
||||
}
|
||||
if (mStartState != mEndState) {
|
||||
// TODO: add to WW log
|
||||
logHomeGesture();
|
||||
}
|
||||
AbstractFloatingView topOpenView = AbstractFloatingView.getTopOpenView(mLauncher);
|
||||
if (topOpenView != null) {
|
||||
@@ -255,17 +251,10 @@ public class NavBarToHomeTouchController implements TouchController,
|
||||
AccessibilityManagerCompat.sendStateEventToTest(mLauncher, targetState.ordinal);
|
||||
}
|
||||
|
||||
private void logStateChange(int startContainerType, int logAction) {
|
||||
mLauncher.getUserEventDispatcher().logStateChangeAction(logAction,
|
||||
LauncherLogProto.Action.Direction.UP,
|
||||
mSwipeDetector.getDownX(), mSwipeDetector.getDownY(),
|
||||
LauncherLogProto.ContainerType.NAVBAR,
|
||||
startContainerType,
|
||||
mEndState.containerType,
|
||||
mLauncher.getWorkspace().getCurrentPage());
|
||||
private void logHomeGesture() {
|
||||
mLauncher.getStatsLogManager().logger()
|
||||
.withSrcState(StatsLogManager.containerTypeToAtomState(mStartState.containerType))
|
||||
.withDstState(StatsLogManager.containerTypeToAtomState(mEndState.containerType))
|
||||
.withSrcState(mStartState.statsLogOrdinal)
|
||||
.withDstState(mEndState.statsLogOrdinal)
|
||||
.log(LAUNCHER_HOME_GESTURE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user