diff options
author | Tony Wickham <twickham@google.com> | 2017-05-19 19:02:03 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2017-05-25 21:37:58 +0000 |
commit | 1d0b0e25dcde8ff3abf3484871c72116581f70d8 (patch) | |
tree | e96c592481f02770917a31e6f15937d848b47619 /src/com/android/launcher3/popup | |
parent | 9c7ed9e9da9dfcac5158b5108891736d716ddee8 (diff) | |
download | android_packages_apps_Trebuchet-1d0b0e25dcde8ff3abf3484871c72116581f70d8.tar.gz android_packages_apps_Trebuchet-1d0b0e25dcde8ff3abf3484871c72116581f70d8.tar.bz2 android_packages_apps_Trebuchet-1d0b0e25dcde8ff3abf3484871c72116581f70d8.zip |
Log when App info or Widgets system shortcuts are tapped
Sample output:
D/UserEvent: action:LONGPRESS
Source child:APP_ICON, grid(1,3), span(1,1), pageIdx=0 parent:WORKSPACE id=0
Elapsed container 135 ms session 7984 ms action 0 ms
isInLandscapeMode false
isInMultiWindowMode false
D/UserEvent: action:TAP
Source child:WIDGETS_BUTTON parent:DEEPSHORTCUTS
Elapsed container 41 ms session 8906 ms action 0 ms
isInLandscapeMode false
isInMultiWindowMode false
D/UserEvent: action:LONGPRESS
Source child:APP_ICON, grid(1,3), span(1,1), pageIdx=0 parent:WORKSPACE id=0
Elapsed container 184 ms session 11297 ms action 0 ms
isInLandscapeMode false
isInMultiWindowMode false
D/UserEvent: action:TAP
Source child:APPINFO_TARGET parent:DEEPSHORTCUTS
Elapsed container 678 ms session 11976 ms action 0 ms
isInLandscapeMode false
isInMultiWindowMode false
Bug: 37430954
Change-Id: I526edbf1eea551eb8eaddbb27e52058804fee874
Diffstat (limited to 'src/com/android/launcher3/popup')
-rw-r--r-- | src/com/android/launcher3/popup/SystemShortcut.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/launcher3/popup/SystemShortcut.java b/src/com/android/launcher3/popup/SystemShortcut.java index a52d1d49b..6254d2d00 100644 --- a/src/com/android/launcher3/popup/SystemShortcut.java +++ b/src/com/android/launcher3/popup/SystemShortcut.java @@ -13,18 +13,20 @@ import com.android.launcher3.Launcher; import com.android.launcher3.R; import com.android.launcher3.model.WidgetItem; import com.android.launcher3.util.PackageUserKey; -import com.android.launcher3.util.Themes; import com.android.launcher3.widget.WidgetsBottomSheet; import java.util.List; +import static com.android.launcher3.userevent.nano.LauncherLogProto.Action; +import static com.android.launcher3.userevent.nano.LauncherLogProto.ControlType; + /** * Represents a system shortcut for a given app. The shortcut should have a static label and * icon, and an onClickListener that depends on the item that the shortcut services. * * Example system shortcuts, defined as inner classes, include Widgets and AppInfo. */ -public abstract class SystemShortcut { +public abstract class SystemShortcut extends ItemInfo { private final int mIconResId; private final int mLabelResId; @@ -66,6 +68,8 @@ public abstract class SystemShortcut { (WidgetsBottomSheet) launcher.getLayoutInflater().inflate( R.layout.widgets_bottom_sheet, launcher.getDragLayer(), false); widgetsBottomSheet.populateAndShow(itemInfo); + launcher.getUserEventDispatcher().logActionOnControl(Action.Touch.TAP, + ControlType.WIDGETS_BUTTON, view); } }; } @@ -85,6 +89,8 @@ public abstract class SystemShortcut { Rect sourceBounds = launcher.getViewBounds(view); Bundle opts = launcher.getActivityLaunchOptions(view); InfoDropTarget.startDetailsActivityForInfo(itemInfo, launcher, null, sourceBounds, opts); + launcher.getUserEventDispatcher().logActionOnControl(Action.Touch.TAP, + ControlType.APPINFO_TARGET, view); } }; } |