Moving mState from Workspace to StateManager
Bug: 67678570
Change-Id: I8cdab044d0760fcc4c188830cde4f963d072b907
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index cd9fffc..2593c49 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -772,7 +772,7 @@
if (!mAppLaunchSuccess) {
getUserEventDispatcher().logActionCommand(Action.Command.STOP,
- mWorkspace.getState().containerType);
+ mStateManager.getState().containerType);
}
NotificationListener.removeNotificationsChangedListener();
}
@@ -1014,7 +1014,7 @@
}
public boolean isInState(LauncherState state) {
- return mWorkspace.getState() == state;
+ return mStateManager.getState() == state;
}
/**
@@ -1426,7 +1426,7 @@
if (topOpenView != null) {
topOpenView.logActionCommand(Action.Command.HOME_INTENT);
} else if (alreadyOnHome) {
- Target target = newContainerTarget(mWorkspace.getState().containerType);
+ Target target = newContainerTarget(mStateManager.getState().containerType);
target.pageIndex = mWorkspace.getCurrentPage();
ued.logActionCommand(Action.Command.HOME_INTENT, target);
}
@@ -1489,7 +1489,7 @@
outState.putInt(RUNTIME_STATE_CURRENT_SCREEN, mWorkspace.getNextPage());
}
- outState.putInt(RUNTIME_STATE, mWorkspace.getState().ordinal);
+ outState.putInt(RUNTIME_STATE, mStateManager.getState().ordinal);
AbstractFloatingView widgets = AbstractFloatingView
@@ -1884,7 +1884,7 @@
if (topView != null) {
topView.onBackPressed();
} else if (!isInState(NORMAL)) {
- ued.logActionCommand(Action.Command.BACK, mWorkspace.getState().containerType);
+ ued.logActionCommand(Action.Command.BACK, mStateManager.getState().containerType);
mStateManager.goToState(NORMAL);
} else {
// Back button is a no-op here, but give at least some feedback for the button press
@@ -2440,7 +2440,7 @@
// TODO: When can workspace be null?
text.add(mWorkspace == null
? getString(R.string.all_apps_home_button_label)
- : mWorkspace.getState().getDescription(this));
+ : mStateManager.getState().getDescription(this));
return result;
}