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

Commit 44ba75fd authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adding logging for showing DWB toast" into ub-launcher3-master

parents aaffa238 c28aa1a1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ enum TipType {
  SWIPE_UP_TEXT = 2;
  QUICK_SCRUB_TEXT = 3;
  PREDICTION_TEXT = 4;
  DWB_TOAST = 5;
}

// Used to define the action component of the LauncherEvent.
+17 −2
Original line number Diff line number Diff line
@@ -22,13 +22,14 @@ import static com.android.launcher3.anim.Interpolators.ACCEL;
import static com.android.launcher3.anim.Interpolators.ACCEL_2;
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
import static com.android.launcher3.uioverrides.TaskViewTouchController.SUCCESS_TRANSITION_PROGRESS;
import static com.android.quickstep.util.ClipAnimationHelper.TransformParams;
import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;
import static com.android.quickstep.TouchInteractionService.EDGE_NAV_BAR;
import static com.android.quickstep.util.ClipAnimationHelper.TransformParams;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.LayoutTransition;
@@ -81,6 +82,7 @@ import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.PropertyListBuilder;
import com.android.launcher3.anim.SpringObjectAnimator;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
import com.android.launcher3.util.OverScroller;
@@ -100,6 +102,7 @@ import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.BackgroundExecutor;
import com.android.systemui.shared.system.LauncherEventUtil;
import com.android.systemui.shared.system.PackageManagerWrapper;
import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat;
import com.android.systemui.shared.system.TaskStackChangeListener;
@@ -167,6 +170,8 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl

    private final ViewPool<TaskView> mTaskViewPool;

    private boolean mDwbToastShown;

    /**
     * TODO: Call reloadIdNeeded in onTaskStackChanged.
     */
@@ -427,6 +432,16 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
    public void setOverviewStateEnabled(boolean enabled) {
        mOverviewStateEnabled = enabled;
        updateTaskStackListenerState();
        if (!enabled) mDwbToastShown = false;
    }

    public void onDigitalWellbeingToastShown() {
        if (!mDwbToastShown) {
            mDwbToastShown = true;
            mActivity.getUserEventDispatcher().logActionTip(
                    LauncherEventUtil.VISIBLE,
                    LauncherLogProto.TipType.DWB_TOAST);
        }
    }

    @Override
+3 −0
Original line number Diff line number Diff line
@@ -326,6 +326,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable {
                                (saturation, contentDescription) -> {
                                    setContentDescription(contentDescription);
                                    mSnapshotView.setSaturation(saturation);
                                    if (mDigitalWellBeingToast.getVisibility() == VISIBLE) {
                                        getRecentsView().onDigitalWellbeingToastShown();
                                    }
                                });
                    });
        } else {