mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Add mStartState to determine if user swipes up from Home.
Bug: 80146880 Test: Manual test Change-Id: Ia0743bff3f2a5b3998a798743138b012ec461a94
This commit is contained in:
@@ -72,7 +72,7 @@ public class LandscapeEdgeSwipeController extends AbstractStateChangeTouchContro
|
||||
@Override
|
||||
protected void onSwipeInteractionCompleted(LauncherState targetState, int logAction) {
|
||||
super.onSwipeInteractionCompleted(targetState, logAction);
|
||||
if (mFromState == NORMAL && targetState == OVERVIEW) {
|
||||
if (mStartState == NORMAL && targetState == OVERVIEW) {
|
||||
RecentsModel.getInstance(mLauncher).onOverviewShown(true, TAG);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr
|
||||
@Override
|
||||
protected void onSwipeInteractionCompleted(LauncherState targetState, int logAction) {
|
||||
super.onSwipeInteractionCompleted(targetState, logAction);
|
||||
if (mFromState == NORMAL && targetState == OVERVIEW) {
|
||||
if (mStartState == NORMAL && targetState == OVERVIEW) {
|
||||
RecentsModel.getInstance(mLauncher).onOverviewShown(true, TAG);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ public abstract class AbstractStateChangeTouchController
|
||||
private boolean mNoIntercept;
|
||||
protected int mStartContainerType;
|
||||
|
||||
protected LauncherState mStartState;
|
||||
protected LauncherState mFromState;
|
||||
protected LauncherState mToState;
|
||||
protected AnimatorPlaybackController mCurrentAnimation;
|
||||
@@ -238,8 +239,10 @@ public abstract class AbstractStateChangeTouchController
|
||||
|
||||
@Override
|
||||
public void onDragStart(boolean start) {
|
||||
mStartState = mLauncher.getStateManager().getState();
|
||||
if (mCurrentAnimation == null) {
|
||||
mFromState = mToState = null;
|
||||
mFromState = mStartState;
|
||||
mToState = null;
|
||||
mAtomicComponentsController = null;
|
||||
reinitCurrentAnimation(false, mDetector.wasInitialTouchPositive());
|
||||
mDisplacementShift = 0;
|
||||
|
||||
Reference in New Issue
Block a user