Merge "Ensuring launcher is always setting "interactionBegin/End" where appropriate (issue 11030735)" into jb-ub-now-indigo-rose
This commit is contained in:
commit
20df4f87ec
|
@ -911,6 +911,7 @@ public class Launcher extends Activity
|
|||
if (DEBUG_RESUME_TIME) {
|
||||
Log.d(TAG, "Time spent in onResume: " + (System.currentTimeMillis() - startTime));
|
||||
}
|
||||
mWorkspace.updateInteractionForState();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3072,7 +3073,6 @@ public class Launcher extends Activity
|
|||
.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
|
||||
|
||||
onWorkspaceShown(animated);
|
||||
onInteractionEnd();
|
||||
}
|
||||
|
||||
public void onWorkspaceShown(boolean animated) {
|
||||
|
@ -3087,7 +3087,6 @@ public class Launcher extends Activity
|
|||
|
||||
// Change the state *after* we've called all the transition code
|
||||
mState = State.APPS_CUSTOMIZE;
|
||||
onInteractionBegin();
|
||||
|
||||
// Pause the auto-advance of widgets until we are out of AllApps
|
||||
mUserPresent = false;
|
||||
|
|
|
@ -1779,19 +1779,16 @@ public class Workspace extends SmoothPagedView
|
|||
if (mTouchState != TOUCH_STATE_REST) {
|
||||
return false;
|
||||
}
|
||||
mLauncher.onInteractionBegin();
|
||||
enableOverviewMode(true, -1, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void exitOverviewMode(boolean animated) {
|
||||
exitOverviewMode(-1, animated);
|
||||
mLauncher.onInteractionEnd();
|
||||
}
|
||||
|
||||
public void exitOverviewMode(int snapPage, boolean animated) {
|
||||
enableOverviewMode(false, snapPage, animated);
|
||||
mLauncher.onInteractionEnd();
|
||||
}
|
||||
|
||||
private void enableOverviewMode(boolean enable, int snapPage, boolean animated) {
|
||||
|
@ -1834,6 +1831,19 @@ public class Workspace extends SmoothPagedView
|
|||
return true;
|
||||
}
|
||||
|
||||
public void updateInteractionForState() {
|
||||
if (mState != State.NORMAL) {
|
||||
mLauncher.onInteractionBegin();
|
||||
} else {
|
||||
mLauncher.onInteractionEnd();
|
||||
}
|
||||
}
|
||||
|
||||
private void setState(State state) {
|
||||
mState = state;
|
||||
updateInteractionForState();
|
||||
}
|
||||
|
||||
Animator getChangeStateAnimation(final State state, boolean animated, int delay, int snapPage) {
|
||||
if (mState == state) {
|
||||
return null;
|
||||
|
@ -1849,7 +1859,7 @@ public class Workspace extends SmoothPagedView
|
|||
final boolean oldStateIsSpringLoaded = (oldState == State.SPRING_LOADED);
|
||||
final boolean oldStateIsSmall = (oldState == State.SMALL);
|
||||
final boolean oldStateIsOverview = (oldState == State.OVERVIEW);
|
||||
mState = state;
|
||||
setState(state);
|
||||
final boolean stateIsNormal = (state == State.NORMAL);
|
||||
final boolean stateIsSpringLoaded = (state == State.SPRING_LOADED);
|
||||
final boolean stateIsSmall = (state == State.SMALL);
|
||||
|
|
Loading…
Reference in New Issue