summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java5
-rw-r--r--quickstep/src/com/android/launcher3/uioverrides/TwoStepSwipeController.java9
2 files changed, 13 insertions, 1 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java b/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java
index 20ee547ac..6395473a6 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/AllAppsState.java
@@ -85,4 +85,9 @@ public class AllAppsState extends LauncherState {
public float getHoseatAlpha(Launcher launcher) {
return launcher.getDeviceProfile().isVerticalBarLayout() ? 0 : 1;
}
+
+ @Override
+ public LauncherState getHistoryForState(LauncherState previousState) {
+ return previousState == OVERVIEW ? OVERVIEW : NORMAL;
+ }
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/TwoStepSwipeController.java b/quickstep/src/com/android/launcher3/uioverrides/TwoStepSwipeController.java
index bdae2d6fc..3a3b51d29 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/TwoStepSwipeController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/TwoStepSwipeController.java
@@ -93,6 +93,7 @@ public class TwoStepSwipeController extends AnimatorListenerAdapter
private static final int FLAG_RECENTS_PLAN_LOADING = 1 << 3;
private static final int FLAG_OVERVIEW_DISABLED = 1 << 4;
private static final int FLAG_DISABLED_TWO_TARGETS = 1 << 5;
+ private static final int FLAG_DISABLED_BACK_TARGET = 1 << 6;
private final Launcher mLauncher;
private final SwipeDetector mDetector;
@@ -261,6 +262,12 @@ public class TwoStepSwipeController extends AnimatorListenerAdapter
// Build current animation
mFromState = mLauncher.getStateManager().getState();
mToState = mLauncher.isInState(ALL_APPS) ? NORMAL : ALL_APPS;
+
+ if (mToState == NORMAL && mLauncher.getStateManager().getLastState() == OVERVIEW) {
+ mToState = OVERVIEW;
+ mDragPauseDetector.addDisabledFlags(FLAG_DISABLED_BACK_TARGET);
+ }
+
mTaggedAnimatorSetBuilder = new TaggedAnimatorSetBuilder();
mCurrentAnimation = mLauncher.getStateManager().createAnimationToNewWorkspace(
mToState, mTaggedAnimatorSetBuilder, maxAccuracy);
@@ -338,7 +345,7 @@ public class TwoStepSwipeController extends AnimatorListenerAdapter
if (fling) {
logAction = Touch.FLING;
- targetState = velocity < 0 ? ALL_APPS : NORMAL;
+ targetState = velocity < 0 ? ALL_APPS : mLauncher.getStateManager().getLastState();
// snap to top or bottom using the release velocity
} else {
logAction = Touch.SWIPE;