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 @@
             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 @@
         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 @@
                         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 @@
         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 @@
         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 @@
         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 @@
         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 @@
                     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 void dispatchUserEvent(LauncherEvent ev, Intent intent) {
+        ev.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
+        ev.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
+
         if (!mIsVerbose) {
             return;
         }
