summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2016-09-28 02:54:19 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-09-28 02:54:19 +0000
commit8866ccf510da0217c3d811302acd1728454ca0be (patch)
tree54f83a318ca4d4e379703daed804fb4c9397fa1b /src/com/android
parente2b9696023f5d87e26d31640c0e7b02bd108191f (diff)
parentffad962092e2b42e336918c2f1e8f5ec48cc08a9 (diff)
downloadandroid_packages_apps_Trebuchet-8866ccf510da0217c3d811302acd1728454ca0be.tar.gz
android_packages_apps_Trebuchet-8866ccf510da0217c3d811302acd1728454ca0be.tar.bz2
android_packages_apps_Trebuchet-8866ccf510da0217c3d811302acd1728454ca0be.zip
Add user event logging for action on search box b/31772967
am: ffad962092 Change-Id: Ifb7364bc68bd4021e85241c793b223514e214f42
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher3/logging/UserEventDispatcher.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java
index 0356a9c7b..b5da04966 100644
--- a/src/com/android/launcher3/logging/UserEventDispatcher.java
+++ b/src/com/android/launcher3/logging/UserEventDispatcher.java
@@ -37,6 +37,9 @@ import java.util.Locale;
/**
* Manages the creation of {@link LauncherEvent}.
+ * To debug this class, execute following command before sideloading a new apk.
+ *
+ * $ adb shell setprop log.tag.UserEvent VERBOSE
*/
public class UserEventDispatcher {
@@ -152,6 +155,15 @@ public class UserEventDispatcher {
dispatchUserEvent(ev, intent);
}
+ public void logActionOnItem(int action, int itemType) {
+ LauncherEvent event = LoggerUtils.initLauncherEvent(Action.TOUCH, Target.ITEM);
+ event.action.touch = action;
+ event.srcTarget[0].itemType = itemType;
+ event.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
+ event.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
+ dispatchUserEvent(event, null);
+ }
+
public void logActionOnControl(int action, int controlType) {
LauncherEvent event = LoggerUtils.initLauncherEvent(Action.TOUCH, Target.CONTROL);
event.action.touch = action;