Logs tap or longpress on task icon.

Sample Log: https://docs.google.com/document/d/1FXi_jY1B63aMSjNyomAmoN1nSTtVbvculNGX7TKdRRw/edit#bookmark=id.psxq3ooyppff
Bug: 157770913

Change-Id: I021b07fa8b3953a0f9a5e5ad9e4ee1c55d98d836
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
index 6b759ba..3a8fcf7 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java
@@ -30,6 +30,7 @@
 import static com.android.launcher3.anim.Interpolators.LINEAR;
 import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR;
 import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
+import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS;
 import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_TAP;
 
 import android.animation.Animator;
@@ -424,6 +425,7 @@
     private boolean showTaskMenu(int action) {
         getRecentsView().snapToPage(getRecentsView().indexOfChild(this));
         mMenuView = TaskMenuView.showForTask(this);
+        mActivity.getStatsLogManager().log(LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS, buildProto());
         UserEventDispatcher.newInstance(getContext()).logActionOnItem(action, Direction.NONE,
                 LauncherLogProto.ItemType.TASK_ICON);
         if (mMenuView != null) {
diff --git a/src/com/android/launcher3/logging/StatsLogManager.java b/src/com/android/launcher3/logging/StatsLogManager.java
index dda39e8..9d94df4 100644
--- a/src/com/android/launcher3/logging/StatsLogManager.java
+++ b/src/com/android/launcher3/logging/StatsLogManager.java
@@ -102,7 +102,11 @@
 
         @UiEvent(doc = "User opened app info of the package by tapping on appinfo system shortcut "
                 + "within longpress popup window.")
-        LAUNCHER_SYSTEM_SHORTCUT_APP_INFO_TAP(515);
+        LAUNCHER_SYSTEM_SHORTCUT_APP_INFO_TAP(515),
+
+        @UiEvent(doc = "User tapped or long pressed on the task icon(aka package icon) "
+                + "from overview to open task menu.")
+        LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS(517);
         // ADD MORE
 
         private final int mId;