diff --git a/src/com/android/launcher3/logging/StatsLogManager.java b/src/com/android/launcher3/logging/StatsLogManager.java index e11d21f34e..dda39e8a51 100644 --- a/src/com/android/launcher3/logging/StatsLogManager.java +++ b/src/com/android/launcher3/logging/StatsLogManager.java @@ -94,7 +94,15 @@ public class StatsLogManager implements ResourceBasedOverride { @UiEvent(doc = "User cancelled uninstalling the package after dropping on " + "the icon onto 'Uninstall' button in the target bar") - LAUNCHER_ITEM_UNINSTALL_CANCELLED(470); + LAUNCHER_ITEM_UNINSTALL_CANCELLED(470), + + @UiEvent(doc = "User opened package specific widgets list by tapping on widgets system " + + "shortcut within longpress popup window.") + LAUNCHER_SYSTEM_SHORTCUT_WIDGETS_TAP(514), + + @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); // ADD MORE private final int mId; diff --git a/src/com/android/launcher3/popup/SystemShortcut.java b/src/com/android/launcher3/popup/SystemShortcut.java index ae35d4c594..58ed5e8132 100644 --- a/src/com/android/launcher3/popup/SystemShortcut.java +++ b/src/com/android/launcher3/popup/SystemShortcut.java @@ -1,5 +1,7 @@ package com.android.launcher3.popup; +import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_APP_INFO_TAP; +import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SYSTEM_SHORTCUT_WIDGETS_TAP; import android.app.ActivityOptions; import android.content.Context; @@ -103,7 +105,6 @@ public abstract class SystemShortcut extends Ite }; public static class Widgets extends SystemShortcut { - public Widgets(Launcher target, ItemInfo itemInfo) { super(R.drawable.ic_widget, R.string.widget_button_text, target, itemInfo); } @@ -117,6 +118,9 @@ public abstract class SystemShortcut extends Ite widgetsBottomSheet.populateAndShow(mItemInfo); mTarget.getUserEventDispatcher().logActionOnControl(Action.Touch.TAP, ControlType.WIDGETS_BUTTON, view); + // TODO(thiruram): Fix missing container info when item is inside folder. + mTarget.getStatsLogManager().log(LAUNCHER_SYSTEM_SHORTCUT_WIDGETS_TAP, + mItemInfo.buildProto()); } } @@ -137,6 +141,9 @@ public abstract class SystemShortcut extends Ite mItemInfo, sourceBounds, ActivityOptions.makeBasic().toBundle()); mTarget.getUserEventDispatcher().logActionOnControl(Action.Touch.TAP, ControlType.APPINFO_TARGET, view); + // TODO(thiruram): Fix missing container info when item is inside folder. + mTarget.getStatsLogManager().log(LAUNCHER_SYSTEM_SHORTCUT_APP_INFO_TAP, + mItemInfo.buildProto()); } }