Loading protos/launcher_log.proto +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ enum ItemType { NOTIFICATION = 8; TASK = 9; // Each page of Recents UI (QuickStep) WEB_APP = 10; TASK_ICON = 11; } // Used to define what type of container a Target would represent. Loading Loading @@ -115,6 +116,7 @@ enum ControlType { REMOTE_ACTION_SHORTCUT = 17; APP_USAGE_SETTINGS = 18; BACK_GESTURE = 19; UNDO = 20; } enum TipType { Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +7 −3 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.R; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.logging.UserEventDispatcher; 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.PendingAnimation; Loading Loading @@ -366,9 +368,11 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { } } private boolean showTaskMenu() { private boolean showTaskMenu(int action) { getRecentsView().snapToPage(getRecentsView().indexOfChild(this)); mMenuView = TaskMenuView.showForTask(this); UserEventDispatcher.newInstance(getContext()).logActionOnItem(action, Direction.NONE, LauncherLogProto.ItemType.TASK_ICON); if (mMenuView != null) { mMenuView.addOnAttachStateChangeListener(mTaskMenuStateListener); } Loading @@ -378,10 +382,10 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { private void setIcon(Drawable icon) { if (icon != null) { mIconView.setDrawable(icon); mIconView.setOnClickListener(v -> showTaskMenu()); mIconView.setOnClickListener(v -> showTaskMenu(Touch.TAP)); mIconView.setOnLongClickListener(v -> { requestDisallowInterceptTouchEvent(true); return showTaskMenu(); return showTaskMenu(Touch.LONGPRESS); }); } else { mIconView.setDrawable(null); Loading Loading
protos/launcher_log.proto +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ enum ItemType { NOTIFICATION = 8; TASK = 9; // Each page of Recents UI (QuickStep) WEB_APP = 10; TASK_ICON = 11; } // Used to define what type of container a Target would represent. Loading Loading @@ -115,6 +116,7 @@ enum ControlType { REMOTE_ACTION_SHORTCUT = 17; APP_USAGE_SETTINGS = 18; BACK_GESTURE = 19; UNDO = 20; } enum TipType { Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +7 −3 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.R; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.logging.UserEventDispatcher; 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.PendingAnimation; Loading Loading @@ -366,9 +368,11 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { } } private boolean showTaskMenu() { private boolean showTaskMenu(int action) { getRecentsView().snapToPage(getRecentsView().indexOfChild(this)); mMenuView = TaskMenuView.showForTask(this); UserEventDispatcher.newInstance(getContext()).logActionOnItem(action, Direction.NONE, LauncherLogProto.ItemType.TASK_ICON); if (mMenuView != null) { mMenuView.addOnAttachStateChangeListener(mTaskMenuStateListener); } Loading @@ -378,10 +382,10 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { private void setIcon(Drawable icon) { if (icon != null) { mIconView.setDrawable(icon); mIconView.setOnClickListener(v -> showTaskMenu()); mIconView.setOnClickListener(v -> showTaskMenu(Touch.TAP)); mIconView.setOnLongClickListener(v -> { requestDisallowInterceptTouchEvent(true); return showTaskMenu(); return showTaskMenu(Touch.LONGPRESS); }); } else { mIconView.setDrawable(null); Loading