Loading quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1433,7 +1433,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener animation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { anim.start(mLauncher, velocityPxPerS); anim.start(mLauncher, mDeviceProfile, velocityPxPerS); } }); return anim; Loading quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -1330,7 +1330,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, if (windowAnimation == null) { continue; } windowAnimation.start(mContext, velocityPxPerMs); DeviceProfile dp = mActivity == null ? null : mActivity.getDeviceProfile(); windowAnimation.start(mContext, dp, velocityPxPerMs); mRunningWindowAnim[i] = RunningWindowAnim.wrap(windowAnimation); } homeAnimFactory.setSwipeVelocity(velocityPxPerMs.y); Loading quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java +1 −1 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ abstract class SwipeUpGestureTutorialController extends TutorialController { }; RectFSpringAnim windowAnim = createWindowAnimationToHome(startShift, homeAnimFactory)[0]; windowAnim.start(mContext, velocityPxPerMs); windowAnim.start(mContext, mDp, velocityPxPerMs); return windowAnim; } } Loading quickstep/src/com/android/quickstep/util/RectFSpringAnim.java +8 −2 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ public class RectFSpringAnim extends ReleaseCheck { * @param context The activity context. * @param velocityPxPerMs Velocity of swipe in px/ms. */ public void start(Context context, PointF velocityPxPerMs) { public void start(Context context, @Nullable DeviceProfile profile, PointF velocityPxPerMs) { // Only tell caller that we ended if both x and y animations have ended. OnAnimationEndListener onXEndListener = ((animation, canceled, centerX, velocityX) -> { mRectXAnimEnded = true; Loading Loading @@ -252,7 +252,13 @@ public class RectFSpringAnim extends ReleaseCheck { float minVisibleChange = Math.abs(1f / mStartRect.height()); ResourceProvider rp = DynamicResource.provider(context); float damping = rp.getFloat(R.dimen.swipe_up_rect_scale_damping_ratio); float stiffness = rp.getFloat(R.dimen.swipe_up_rect_scale_stiffness); // Increase the stiffness for devices where we want the window size to transform quicker. boolean shouldUseHigherStiffness = profile != null && (profile.isLandscape || profile.isTablet); float stiffness = shouldUseHigherStiffness ? rp.getFloat(R.dimen.swipe_up_rect_scale_higher_stiffness) : rp.getFloat(R.dimen.swipe_up_rect_scale_stiffness); mRectScaleAnim = new SpringAnimation(this, RECT_SCALE_PROGRESS) .setSpring(new SpringForce(1f) Loading res/values/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,7 @@ <item name="swipe_up_rect_scale_damping_ratio" type="dimen" format="float">0.75</item> <item name="swipe_up_rect_scale_stiffness" type="dimen" format="float">200</item> <item name="swipe_up_rect_scale_higher_stiffness" type="dimen" format="float">400</item> <item name="swipe_up_rect_xy_fling_friction" type="dimen" format="float">1.5</item> Loading Loading
quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -1433,7 +1433,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener animation.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { anim.start(mLauncher, velocityPxPerS); anim.start(mLauncher, mDeviceProfile, velocityPxPerS); } }); return anim; Loading
quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -1330,7 +1330,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, if (windowAnimation == null) { continue; } windowAnimation.start(mContext, velocityPxPerMs); DeviceProfile dp = mActivity == null ? null : mActivity.getDeviceProfile(); windowAnimation.start(mContext, dp, velocityPxPerMs); mRunningWindowAnim[i] = RunningWindowAnim.wrap(windowAnimation); } homeAnimFactory.setSwipeVelocity(velocityPxPerMs.y); Loading
quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java +1 −1 Original line number Diff line number Diff line Loading @@ -358,7 +358,7 @@ abstract class SwipeUpGestureTutorialController extends TutorialController { }; RectFSpringAnim windowAnim = createWindowAnimationToHome(startShift, homeAnimFactory)[0]; windowAnim.start(mContext, velocityPxPerMs); windowAnim.start(mContext, mDp, velocityPxPerMs); return windowAnim; } } Loading
quickstep/src/com/android/quickstep/util/RectFSpringAnim.java +8 −2 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ public class RectFSpringAnim extends ReleaseCheck { * @param context The activity context. * @param velocityPxPerMs Velocity of swipe in px/ms. */ public void start(Context context, PointF velocityPxPerMs) { public void start(Context context, @Nullable DeviceProfile profile, PointF velocityPxPerMs) { // Only tell caller that we ended if both x and y animations have ended. OnAnimationEndListener onXEndListener = ((animation, canceled, centerX, velocityX) -> { mRectXAnimEnded = true; Loading Loading @@ -252,7 +252,13 @@ public class RectFSpringAnim extends ReleaseCheck { float minVisibleChange = Math.abs(1f / mStartRect.height()); ResourceProvider rp = DynamicResource.provider(context); float damping = rp.getFloat(R.dimen.swipe_up_rect_scale_damping_ratio); float stiffness = rp.getFloat(R.dimen.swipe_up_rect_scale_stiffness); // Increase the stiffness for devices where we want the window size to transform quicker. boolean shouldUseHigherStiffness = profile != null && (profile.isLandscape || profile.isTablet); float stiffness = shouldUseHigherStiffness ? rp.getFloat(R.dimen.swipe_up_rect_scale_higher_stiffness) : rp.getFloat(R.dimen.swipe_up_rect_scale_stiffness); mRectScaleAnim = new SpringAnimation(this, RECT_SCALE_PROGRESS) .setSpring(new SpringForce(1f) Loading
res/values/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,7 @@ <item name="swipe_up_rect_scale_damping_ratio" type="dimen" format="float">0.75</item> <item name="swipe_up_rect_scale_stiffness" type="dimen" format="float">200</item> <item name="swipe_up_rect_scale_higher_stiffness" type="dimen" format="float">400</item> <item name="swipe_up_rect_xy_fling_friction" type="dimen" format="float">1.5</item> Loading