Log the right workspace id for -1 screen for stop and resume.

Test: manual
Bug: 137952354

Logs after this fix:
08-01 12:01:36.220 17105 17105 D UserEvent: action:STOP
08-01 12:01:36.220 17105 17105 D UserEvent:  Source child:WORKSPACE id=-1
08-01 12:01:36.220 17105 17105 D UserEvent:  Elapsed container 5511 ms, session 5511 ms, action 0 ms
08-01 12:01:36.220 17105 17105 D UserEvent:
08-01 12:01:38.042 17105 17105 D UserEvent:
08-01 12:01:38.042 17105 17105 D UserEvent: -----------------------------------------------------
08-01 12:01:38.042 17105 17105 D UserEvent: action:RESUME
08-01 12:01:38.042 17105 17105 D UserEvent:  Source child:WORKSPACE id=-1
08-01 12:01:38.042 17105 17105 D UserEvent:  Elapsed container 7334 ms, session 7334 ms, action 0 ms
08-01 12:01:38.042 17105 17105 D UserEvent:

Change-Id: Ic2d88eee3ff7a0e28d5c7e4cab8ee61952ed95ee
This commit is contained in:
Becky Qiu
2019-08-01 11:09:38 -07:00
parent f489a71365
commit bfc2da1fd8
3 changed files with 25 additions and 5 deletions

View File

@@ -187,6 +187,14 @@ public class UserEventDispatcher implements ResourceBasedOverride {
dstContainerType >=0 ? newContainerTarget(dstContainerType) : null);
}
public void logActionCommand(int command, int srcContainerType, int dstContainerType,
int pageIndex) {
Target srcTarget = newContainerTarget(srcContainerType);
srcTarget.pageIndex = pageIndex;
logActionCommand(command, srcTarget,
dstContainerType >=0 ? newContainerTarget(dstContainerType) : null);
}
public void logActionCommand(int command, Target srcTarget, Target dstTarget) {
LauncherEvent event = newLauncherEvent(newCommandAction(command), srcTarget);
if (command == Action.Command.STOP) {