mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Only allow horizontal spring if page will change." into ub-launcher3-master
This commit is contained in:
committed by
Android (Google) Code Review
commit
31ff98e144
@@ -42,21 +42,6 @@ import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.view.animation.Interpolator;
|
||||
import android.widget.ScrollView;
|
||||
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.compat.AccessibilityManagerCompat;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.model.PagedViewOrientedState;
|
||||
import com.android.launcher3.pageindicators.PageIndicator;
|
||||
import com.android.launcher3.states.RotationHelper;
|
||||
import com.android.launcher3.touch.PortraitPagedViewHandler;
|
||||
import com.android.launcher3.touch.OverScroll;
|
||||
import com.android.launcher3.touch.PagedOrientationHandler;
|
||||
import com.android.launcher3.touch.PagedOrientationHandler.ChildBounds;
|
||||
import com.android.launcher3.util.OverScroller;
|
||||
import com.android.launcher3.util.Thunk;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.isAccessibilityEnabled;
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.isObservedEventType;
|
||||
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
|
||||
@@ -65,6 +50,20 @@ import static com.android.launcher3.touch.PagedOrientationHandler.CANVAS_TRANSLA
|
||||
import static com.android.launcher3.touch.PagedOrientationHandler.VIEW_SCROLL_BY;
|
||||
import static com.android.launcher3.touch.PagedOrientationHandler.VIEW_SCROLL_TO;
|
||||
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.compat.AccessibilityManagerCompat;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.model.PagedViewOrientedState;
|
||||
import com.android.launcher3.pageindicators.PageIndicator;
|
||||
import com.android.launcher3.touch.OverScroll;
|
||||
import com.android.launcher3.touch.PagedOrientationHandler;
|
||||
import com.android.launcher3.touch.PagedOrientationHandler.ChildBounds;
|
||||
import com.android.launcher3.touch.PortraitPagedViewHandler;
|
||||
import com.android.launcher3.util.OverScroller;
|
||||
import com.android.launcher3.util.Thunk;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* An abstraction of the original Workspace which supports browsing through a
|
||||
* sequential list of "pages"
|
||||
@@ -1515,7 +1514,7 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
|
||||
// interpolator at zero, ie. 5. We use 4 to make it a little slower.
|
||||
duration = 4 * Math.round(1000 * Math.abs(distance / velocity));
|
||||
|
||||
if (QUICKSTEP_SPRINGS.get()) {
|
||||
if (QUICKSTEP_SPRINGS.get() && mCurrentPage != whichPage) {
|
||||
return snapToPage(whichPage, delta, duration, false, null,
|
||||
velocity * Math.signum(delta), true);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user