summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2016-10-03 21:01:25 (GMT)
committerHyunyoung Song <hyunyoungs@google.com>2016-10-03 21:01:25 (GMT)
commitd8fcffb8fe61a0288a85ac588ae51f7ed064f7c7 (patch)
tree824a84b1d5d4d0fb4ff63a0a4463de696cb7b3d9
parent70a421e2243fd0e89b694e888adf0a628a30c42d (diff)
downloadandroid_packages_apps_Trebuchet-d8fcffb8fe61a0288a85ac588ae51f7ed064f7c7.zip
android_packages_apps_Trebuchet-d8fcffb8fe61a0288a85ac588ae51f7ed064f7c7.tar.gz
android_packages_apps_Trebuchet-d8fcffb8fe61a0288a85ac588ae51f7ed064f7c7.tar.bz2
Add user event logging for tap on search
b/31772967 Change-Id: I71ececb8195d46405623a8ae2a99d001088d9181
-rw-r--r--src/com/android/launcher3/logging/LoggerUtils.java4
-rw-r--r--src/com/android/launcher3/logging/UserEventDispatcher.java18
2 files changed, 7 insertions, 15 deletions
diff --git a/src/com/android/launcher3/logging/LoggerUtils.java b/src/com/android/launcher3/logging/LoggerUtils.java
index 845dbc2..c2b97eb 100644
--- a/src/com/android/launcher3/logging/LoggerUtils.java
+++ b/src/com/android/launcher3/logging/LoggerUtils.java
@@ -60,6 +60,7 @@ public class LoggerUtils {
case LauncherLogProto.WIDGET: typeStr = "WIDGET"; break;
case LauncherLogProto.DEEPSHORTCUT: typeStr = "DEEPSHORTCUT"; break;
case LauncherLogProto.FOLDER_ICON: typeStr = "FOLDERICON"; break;
+ case LauncherLogProto.SEARCHBOX: typeStr = "SEARCHBOX"; break;
default: typeStr = "UNKNOWN";
}
@@ -73,6 +74,9 @@ public class LoggerUtils {
if (t.intentHash != 0) {
typeStr += ", intentHash=" + t.intentHash;
}
+ if (t.spanX != 0) {
+ typeStr += ", spanX=" + t.spanX;
+ }
return typeStr += ", grid=(" + t.gridX + "," + t.gridY + "), id=" + t.pageIndex;
}
diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java
index b5da049..56fdce8 100644
--- a/src/com/android/launcher3/logging/UserEventDispatcher.java
+++ b/src/com/android/launcher3/logging/UserEventDispatcher.java
@@ -140,10 +140,6 @@ public class UserEventDispatcher {
new ComponentKey(cn, itemInfo.user));
}
}
-
- // Fill in the duration of time spent navigating in Launcher and the container.
- event.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
- event.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
return event;
}
@@ -159,8 +155,6 @@ public class UserEventDispatcher {
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);
}
@@ -168,8 +162,6 @@ public class UserEventDispatcher {
LauncherEvent event = LoggerUtils.initLauncherEvent(Action.TOUCH, Target.CONTROL);
event.action.touch = action;
event.srcTarget[0].controlType = controlType;
- event.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
- event.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
dispatchUserEvent(event, null);
}
@@ -178,8 +170,6 @@ public class UserEventDispatcher {
event.action.touch = action;
event.action.dir = dir;
event.srcTarget[0].containerType = containerType;
- event.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
- event.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
dispatchUserEvent(event, null);
}
@@ -193,8 +183,6 @@ public class UserEventDispatcher {
ItemInfo info = (ItemInfo) icon.getTag();
provider.fillInLaunchSourceData(icon, info, event.srcTarget[0], event.srcTarget[1]);
event.action.touch = Action.LONGPRESS;
- event.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
- event.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
dispatchUserEvent(event, null);
}
@@ -218,9 +206,6 @@ public class UserEventDispatcher {
dragObj.dragInfo, event.destTarget[0], event.destTarget[1]);
}
-
- event.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
- event.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
event.actionDurationMillis = SystemClock.uptimeMillis() - mActionDurationMillis;
dispatchUserEvent(event, null);
}
@@ -242,6 +227,9 @@ public class UserEventDispatcher {
}
public void dispatchUserEvent(LauncherEvent ev, Intent intent) {
+ ev.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
+ ev.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
+
if (!mIsVerbose) {
return;
}