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:
1 parent
f489a71365
commit
bfc2da1fd8
3 files changed
+25
-5
No files matched your search
@@ -873,9 +873,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
|||||||
if (mLauncherCallbacks != null) {
|
if (mLauncherCallbacks != null) {
|
||||||
mLauncherCallbacks.onStop();
|
mLauncherCallbacks.onStop();
|
||||||
}
|
}
|
||||||
|
logStopAndResume(Action.Command.STOP);
|
||||||
getUserEventDispatcher().logActionCommand(Action.Command.STOP,
|
|
||||||
mStateManager.getState().containerType, -1);
|
|
||||||
|
|
||||||
mAppWidgetHost.setListenIfResumed(false);
|
mAppWidgetHost.setListenIfResumed(false);
|
||||||
|
|
||||||
@@ -901,8 +899,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
|||||||
|
|
||||||
private void handleDeferredResume() {
|
private void handleDeferredResume() {
|
||||||
if (hasBeenResumed() && !mStateManager.getState().disableInteraction) {
|
if (hasBeenResumed() && !mStateManager.getState().disableInteraction) {
|
||||||
getUserEventDispatcher().logActionCommand(Action.Command.RESUME,
|
logStopAndResume(Action.Command.RESUME);
|
||||||
mStateManager.getState().containerType, -1);
|
|
||||||
getUserEventDispatcher().startSession();
|
getUserEventDispatcher().startSession();
|
||||||
|
|
||||||
UiFactory.onLauncherStateOrResumeChanged(this);
|
UiFactory.onLauncherStateOrResumeChanged(this);
|
||||||
@@ -929,6 +926,17 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void logStopAndResume(int command) {
|
||||||
|
int containerType = mStateManager.getState().containerType;
|
||||||
|
if (containerType == ContainerType.WORKSPACE && mWorkspace != null) {
|
||||||
|
getUserEventDispatcher().logActionCommand(command,
|
||||||
|
containerType, -1, mWorkspace.isOverlayShown() ? -1 : 0);
|
||||||
|
} else {
|
||||||
|
getUserEventDispatcher().logActionCommand(command, containerType, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected void onStateSet(LauncherState state) {
|
protected void onStateSet(LauncherState state) {
|
||||||
getAppWidgetHost().setResumed(state == LauncherState.NORMAL);
|
getAppWidgetHost().setResumed(state == LauncherState.NORMAL);
|
||||||
if (mDeferredResumePending) {
|
if (mDeferredResumePending) {
|
||||||
|
|||||||
@@ -3251,6 +3251,10 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isOverlayShown() {
|
||||||
|
return mOverlayShown;
|
||||||
|
}
|
||||||
|
|
||||||
void moveToDefaultScreen() {
|
void moveToDefaultScreen() {
|
||||||
int page = DEFAULT_PAGE;
|
int page = DEFAULT_PAGE;
|
||||||
if (!workspaceInModalState() && getNextPage() != page) {
|
if (!workspaceInModalState() && getNextPage() != page) {
|
||||||
|
|||||||
@@ -187,6 +187,14 @@ public class UserEventDispatcher implements ResourceBasedOverride {
|
|||||||
dstContainerType >=0 ? newContainerTarget(dstContainerType) : null);
|
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) {
|
public void logActionCommand(int command, Target srcTarget, Target dstTarget) {
|
||||||
LauncherEvent event = newLauncherEvent(newCommandAction(command), srcTarget);
|
LauncherEvent event = newLauncherEvent(newCommandAction(command), srcTarget);
|
||||||
if (command == Action.Command.STOP) {
|
if (command == Action.Command.STOP) {
|
||||||
|
|||||||
Reference in new issue
Block a user