Adding logging for showing DWB toast
We generate an event upon every invocation of Overview with at least one DWB toast. Bug: 123892673 Change-Id: Ia24f4be8e9f0f6ab6d31095b8367b73fb6c8cd7f
This commit is contained in:
parent
f820d5d817
commit
c28aa1a197
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue