Add user event logging for tap on search
b/31772967 Change-Id: I71ececb8195d46405623a8ae2a99d001088d9181
This commit is contained in:
parent
70a421e224
commit
d8fcffb8fe
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue