Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b670d62 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Good riddance UserEventDispatcher [1/n]

Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
parent ec50c06c
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.launcher3.appprediction;
import static com.android.launcher3.AbstractFloatingView.TYPE_DISCOVERY_BOUNCE;
import static com.android.launcher3.AbstractFloatingView.TYPE_ON_BOARD_POPUP;
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.quickstep.logging.UserEventDispatcherExtension.ALL_APPS_PREDICTION_TIPS;

import android.os.UserManager;

@@ -31,7 +30,6 @@ import com.android.launcher3.Utilities;
import com.android.launcher3.allapps.FloatingHeaderView;
import com.android.launcher3.statemanager.StateManager.StateListener;
import com.android.launcher3.views.ArrowTipView;
import com.android.systemui.shared.system.LauncherEventUtil;

/**
 * ArrowTip helper aligned just above prediction apps, shown to users that enter all apps for the
@@ -57,8 +55,7 @@ public class AllAppsTipView {
        floatingHeaderView.findFixedRowByType(PredictionRowView.class).getLocationOnScreen(coords);
        ArrowTipView arrowTipView = new ArrowTipView(launcher).setOnClosedCallback(() -> {
            launcher.getSharedPrefs().edit().putBoolean(ALL_APPS_TIP_SEEN, true).apply();
            launcher.getUserEventDispatcher().logActionTip(LauncherEventUtil.DISMISS,
                    ALL_APPS_PREDICTION_TIPS);
            // TODO: add log to WW
        });
        arrowTipView.show(launcher.getString(R.string.all_apps_prediction_tip), coords[1]);

+0 −11
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.uioverrides.PredictedAppIcon;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.views.AbstractSlideInView;

import java.util.List;
@@ -122,16 +121,6 @@ public class HotseatEduDialog extends AbstractSlideInView implements Insettable
        handleClose(true);
    }

    @Override
    public void logActionCommand(int command) {
        // Since this is on-boarding popup, it is not a user controlled action.
    }

    @Override
    public int getLogContainerType() {
        return LauncherLogProto.ContainerType.TIP;
    }

    @Override
    protected boolean isOfType(int type) {
        return (type & TYPE_ON_BOARD_POPUP) != 0;
+0 −6
Original line number Diff line number Diff line
@@ -624,12 +624,6 @@ public class HotseatPredictionController implements DragController.DragListener,
        //Does nothing
    }

    @Override
    public void fillInLogContainerData(ItemInfo childInfo, LauncherLogProto.Target child,
            ArrayList<LauncherLogProto.Target> parents) {
        mHotseat.fillInLogContainerData(childInfo, child, parents);
    }

    /**
     * Logs rank info based on current list of predicted items
     */
+0 −4
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
package com.android.launcher3.uioverrides.states;

import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON;
import static com.android.quickstep.SysUINavigationMode.hideShelfInTwoButtonLandscape;
import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview;
@@ -30,7 +29,6 @@ import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.Workspace;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.quickstep.SysUINavigationMode;
import com.android.quickstep.util.LayoutUtils;
@@ -177,8 +175,6 @@ public class OverviewState extends LauncherState {
    public void onBackPressed(Launcher launcher) {
        TaskView taskView = launcher.<RecentsView>getOverviewPanel().getRunningTaskView();
        if (taskView != null) {
            launcher.getUserEventDispatcher().logActionCommand(Action.Command.BACK,
                    newContainerTarget(ContainerType.OVERVIEW));
            taskView.launchTask(true);
        } else {
            super.onBackPressed(launcher);
+2 −2
Original line number Diff line number Diff line
@@ -229,12 +229,12 @@ public class NavBarToHomeTouchController implements TouchController,
                        () -> onSwipeInteractionCompleted(mEndState));
            }
            if (mStartState != mEndState) {
                logStateChange(mStartState.containerType, logAction);
                // TODO: add to WW log
            }
            AbstractFloatingView topOpenView = AbstractFloatingView.getTopOpenView(mLauncher);
            if (topOpenView != null) {
                AbstractFloatingView.closeAllOpenViews(mLauncher);
                logStateChange(topOpenView.getLogContainerType(), logAction);
                // TODO: add to WW log
            }
            ActivityManagerWrapper.getInstance()
                    .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS);
Loading