Merge "Fix some issues with shelf jumping/duration" into ub-launcher3-qt-dev
am: 9e26fccacc
Change-Id: Ia310ffbe1f39902d2be371fb9467e72cf87002ee
This commit is contained in:
+7
-2
@@ -902,7 +902,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
|
|||||||
float minFlingVelocity = mContext.getResources()
|
float minFlingVelocity = mContext.getResources()
|
||||||
.getDimension(R.dimen.quickstep_fling_min_velocity);
|
.getDimension(R.dimen.quickstep_fling_min_velocity);
|
||||||
if (Math.abs(endVelocity) > minFlingVelocity && mTransitionDragLength > 0) {
|
if (Math.abs(endVelocity) > minFlingVelocity && mTransitionDragLength > 0) {
|
||||||
if (endTarget == RECENTS) {
|
if (endTarget == RECENTS && mMode != Mode.NO_BUTTON) {
|
||||||
Interpolators.OvershootParams overshoot = new Interpolators.OvershootParams(
|
Interpolators.OvershootParams overshoot = new Interpolators.OvershootParams(
|
||||||
startShift, endShift, endShift, velocityPxPerMs.y,
|
startShift, endShift, endShift, velocityPxPerMs.y,
|
||||||
mTransitionDragLength);
|
mTransitionDragLength);
|
||||||
@@ -918,6 +918,10 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
|
|||||||
// derivative of the scroll interpolator at zero, ie. 2.
|
// derivative of the scroll interpolator at zero, ie. 2.
|
||||||
long baseDuration = Math.round(Math.abs(distanceToTravel / velocityPxPerMs.y));
|
long baseDuration = Math.round(Math.abs(distanceToTravel / velocityPxPerMs.y));
|
||||||
duration = Math.min(MAX_SWIPE_DURATION, 2 * baseDuration);
|
duration = Math.min(MAX_SWIPE_DURATION, 2 * baseDuration);
|
||||||
|
|
||||||
|
if (endTarget == RECENTS) {
|
||||||
|
interpolator = OVERSHOOT_1_2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -932,7 +936,8 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
|
|||||||
} else if (endTarget == RECENTS) {
|
} else if (endTarget == RECENTS) {
|
||||||
mLiveTileOverlay.startIconAnimation();
|
mLiveTileOverlay.startIconAnimation();
|
||||||
if (mRecentsView != null) {
|
if (mRecentsView != null) {
|
||||||
duration = Math.max(duration, mRecentsView.getScroller().getDuration());
|
duration = Utilities.boundToRange(mRecentsView.getScroller().getDuration(),
|
||||||
|
duration, MAX_SWIPE_DURATION);
|
||||||
}
|
}
|
||||||
if (mMode == Mode.NO_BUTTON) {
|
if (mMode == Mode.NO_BUTTON) {
|
||||||
setShelfState(ShelfAnimState.OVERVIEW, interpolator, duration);
|
setShelfState(ShelfAnimState.OVERVIEW, interpolator, duration);
|
||||||
|
|||||||
Reference in New Issue
Block a user