Add logging for long presses. Reset elapsed timer when changing containers.

This is the first CL in a series of logging-related CLs. Upcoming CLs will
include using Commands (HOME_INTENT, BACK) and "tapping outside" of a container
logic.

Change-Id: I62f0a08c7a9d9fce0baa5c12c67e21f63ab16a7c
This commit is contained in:
Jon Miranda
2016-10-05 14:08:11 -07:00
parent cc3f3349f4
commit f3e35d9331
5 changed files with 86 additions and 29 deletions

View File

@@ -166,10 +166,15 @@ public class UserEventDispatcher {
}
public void logActionOnContainer(int action, int dir, int containerType) {
logActionOnContainer(action, dir, containerType, 0);
}
public void logActionOnContainer(int action, int dir, int containerType, int pageIndex) {
LauncherEvent event = LoggerUtils.initLauncherEvent(Action.TOUCH, Target.CONTAINER);
event.action.touch = action;
event.action.dir = dir;
event.srcTarget[0].containerType = containerType;
event.srcTarget[0].pageIndex = pageIndex;
dispatchUserEvent(event, null);
}
@@ -184,6 +189,8 @@ public class UserEventDispatcher {
provider.fillInLaunchSourceData(icon, info, event.srcTarget[0], event.srcTarget[1]);
event.action.touch = Action.LONGPRESS;
dispatchUserEvent(event, null);
resetElapsedContainerMillis();
}
public void setPredictedApps(List<ComponentKey> predictedApps) {