Log time spent on different UI surfaces

- When swipe happens on worskpace, elapsed container ms is reset
- Fling DOWN is also logged so that we now know how much time was spent on
  all apps screen
- If screen off or power button trigger onPause, log this event.

Bug: 67745115
Change-Id: Ie3a0090c78195a4a028de9935131e9e034dcf48a
This commit is contained in:
Hyunyoung Song
2017-10-17 15:39:46 -07:00
parent f9403d92fa
commit 7fb3ccc4a5
5 changed files with 53 additions and 21 deletions

View File

@@ -232,6 +232,10 @@ public class UserEventDispatcher {
event.action.dir = dir;
event.srcTarget[0].pageIndex = pageIndex;
dispatchUserEvent(event, null);
if (action == Action.Touch.SWIPE) {
resetElapsedContainerMillis();
}
}
public void logActionOnItem(int action, int dir, int itemType) {
@@ -323,6 +327,7 @@ public class UserEventDispatcher {
ev.actionDurationMillis);
log += "\n isInLandscapeMode " + ev.isInLandscapeMode;
log += "\n isInMultiWindowMode " + ev.isInMultiWindowMode;
log += "\n";
Log.d(TAG, log);
}