Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java +0 −5 Original line number Diff line number Diff line Loading @@ -25,11 +25,8 @@ import static com.android.launcher3.anim.Interpolators.ACCEL; import static com.android.launcher3.anim.Interpolators.DEACCEL; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.LINEAR_TELEPORT; import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PROGRESS; import android.view.MotionEvent; Loading Loading @@ -140,7 +137,6 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(ACCEL, ALL_APPS_SCRIM_VISIBLE_THRESHOLD, ALL_APPS_SCRIM_OPAQUE_THRESHOLD)); builder.setInterpolator(ANIM_VERTICAL_PROGRESS, isTablet ? LINEAR_TELEPORT : LINEAR); return builder; } Loading @@ -155,7 +151,6 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(DEACCEL, 1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD, 1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD)); builder.setInterpolator(ANIM_VERTICAL_PROGRESS, isTablet ? LINEAR_TELEPORT : LINEAR); return builder; } Loading src/com/android/launcher3/LauncherAnimUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ public class LauncherAnimUtils { // Progress after which the transition is assumed to be a success public static final float SUCCESS_TRANSITION_PROGRESS = 0.5f; public static final float TABLET_BOTTOM_SHEET_SUCCESS_TRANSITION_PROGRESS = 0.3f; public static final IntProperty<Drawable> DRAWABLE_ALPHA = new IntProperty<Drawable>("drawableAlpha") { Loading src/com/android/launcher3/anim/Interpolators.java +0 −17 Original line number Diff line number Diff line Loading @@ -130,23 +130,6 @@ public class Interpolators { } }; public static final Interpolator LINEAR_TELEPORT = t -> { float startTeleport = 0.2f; float endTeleport = 0.4f; float teleportProgress = 0.5f; float v; if (t < startTeleport) { v = LINEAR.getInterpolation(t); } else if (t < endTeleport) { v = Utilities.mapToRange(t, startTeleport, endTeleport, startTeleport, endTeleport + teleportProgress, ACCEL_DEACCEL); } else { v = LINEAR.getInterpolation(t) + teleportProgress; } v = Utilities.boundToRange(v, 0f, 1f); return v; }; private static final float FAST_FLING_PX_MS = 10; public static Interpolator scrollInterpolatorForVelocity(float velocity) { Loading src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +7 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.touch; import static com.android.launcher3.LauncherAnimUtils.SUCCESS_TRANSITION_PROGRESS; import static com.android.launcher3.LauncherAnimUtils.TABLET_BOTTOM_SHEET_SUCCESS_TRANSITION_PROGRESS; import static com.android.launcher3.LauncherAnimUtils.newCancelListener; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.NORMAL; Loading Loading @@ -285,8 +286,13 @@ public abstract class AbstractStateChangeTouchController ? mToState : mFromState; // snap to top or bottom using the release velocity } else { float successTransitionProgress = mLauncher.getDeviceProfile().isTablet && (mToState == ALL_APPS || mFromState == ALL_APPS) ? TABLET_BOTTOM_SHEET_SUCCESS_TRANSITION_PROGRESS : SUCCESS_TRANSITION_PROGRESS; targetState = (interpolatedProgress > SUCCESS_TRANSITION_PROGRESS) ? mToState : mFromState; (interpolatedProgress > successTransitionProgress) ? mToState : mFromState; } final float endProgress; Loading src/com/android/launcher3/touch/AllAppsSwipeController.java +0 −4 Original line number Diff line number Diff line Loading @@ -20,10 +20,8 @@ import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.LINEAR_TELEPORT; import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PROGRESS; import android.view.MotionEvent; import android.view.animation.Interpolator; Loading Loading @@ -113,7 +111,6 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { config.setInterpolator(ANIM_SCRIM_FADE, ALLAPPS_STAGGERED_FADE_LATE_RESPONDER); config.setInterpolator(ANIM_ALL_APPS_FADE, isTablet ? FINAL_FRAME : ALLAPPS_STAGGERED_FADE_EARLY_RESPONDER); config.setInterpolator(ANIM_VERTICAL_PROGRESS, isTablet ? LINEAR_TELEPORT : LINEAR); } /** Loading @@ -125,7 +122,6 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { config.setInterpolator(ANIM_SCRIM_FADE, ALLAPPS_STAGGERED_FADE_EARLY_RESPONDER); config.setInterpolator(ANIM_ALL_APPS_FADE, isTablet ? INSTANT : ALLAPPS_STAGGERED_FADE_LATE_RESPONDER); config.setInterpolator(ANIM_VERTICAL_PROGRESS, isTablet ? LINEAR_TELEPORT : LINEAR); } Loading Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java +0 −5 Original line number Diff line number Diff line Loading @@ -25,11 +25,8 @@ import static com.android.launcher3.anim.Interpolators.ACCEL; import static com.android.launcher3.anim.Interpolators.DEACCEL; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.LINEAR_TELEPORT; import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PROGRESS; import android.view.MotionEvent; Loading Loading @@ -140,7 +137,6 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(ACCEL, ALL_APPS_SCRIM_VISIBLE_THRESHOLD, ALL_APPS_SCRIM_OPAQUE_THRESHOLD)); builder.setInterpolator(ANIM_VERTICAL_PROGRESS, isTablet ? LINEAR_TELEPORT : LINEAR); return builder; } Loading @@ -155,7 +151,6 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(DEACCEL, 1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD, 1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD)); builder.setInterpolator(ANIM_VERTICAL_PROGRESS, isTablet ? LINEAR_TELEPORT : LINEAR); return builder; } Loading
src/com/android/launcher3/LauncherAnimUtils.java +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ public class LauncherAnimUtils { // Progress after which the transition is assumed to be a success public static final float SUCCESS_TRANSITION_PROGRESS = 0.5f; public static final float TABLET_BOTTOM_SHEET_SUCCESS_TRANSITION_PROGRESS = 0.3f; public static final IntProperty<Drawable> DRAWABLE_ALPHA = new IntProperty<Drawable>("drawableAlpha") { Loading
src/com/android/launcher3/anim/Interpolators.java +0 −17 Original line number Diff line number Diff line Loading @@ -130,23 +130,6 @@ public class Interpolators { } }; public static final Interpolator LINEAR_TELEPORT = t -> { float startTeleport = 0.2f; float endTeleport = 0.4f; float teleportProgress = 0.5f; float v; if (t < startTeleport) { v = LINEAR.getInterpolation(t); } else if (t < endTeleport) { v = Utilities.mapToRange(t, startTeleport, endTeleport, startTeleport, endTeleport + teleportProgress, ACCEL_DEACCEL); } else { v = LINEAR.getInterpolation(t) + teleportProgress; } v = Utilities.boundToRange(v, 0f, 1f); return v; }; private static final float FAST_FLING_PX_MS = 10; public static Interpolator scrollInterpolatorForVelocity(float velocity) { Loading
src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +7 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.touch; import static com.android.launcher3.LauncherAnimUtils.SUCCESS_TRANSITION_PROGRESS; import static com.android.launcher3.LauncherAnimUtils.TABLET_BOTTOM_SHEET_SUCCESS_TRANSITION_PROGRESS; import static com.android.launcher3.LauncherAnimUtils.newCancelListener; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.NORMAL; Loading Loading @@ -285,8 +286,13 @@ public abstract class AbstractStateChangeTouchController ? mToState : mFromState; // snap to top or bottom using the release velocity } else { float successTransitionProgress = mLauncher.getDeviceProfile().isTablet && (mToState == ALL_APPS || mFromState == ALL_APPS) ? TABLET_BOTTOM_SHEET_SUCCESS_TRANSITION_PROGRESS : SUCCESS_TRANSITION_PROGRESS; targetState = (interpolatedProgress > SUCCESS_TRANSITION_PROGRESS) ? mToState : mFromState; (interpolatedProgress > successTransitionProgress) ? mToState : mFromState; } final float endProgress; Loading
src/com/android/launcher3/touch/AllAppsSwipeController.java +0 −4 Original line number Diff line number Diff line Loading @@ -20,10 +20,8 @@ import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.launcher3.anim.Interpolators.LINEAR_TELEPORT; import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PROGRESS; import android.view.MotionEvent; import android.view.animation.Interpolator; Loading Loading @@ -113,7 +111,6 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { config.setInterpolator(ANIM_SCRIM_FADE, ALLAPPS_STAGGERED_FADE_LATE_RESPONDER); config.setInterpolator(ANIM_ALL_APPS_FADE, isTablet ? FINAL_FRAME : ALLAPPS_STAGGERED_FADE_EARLY_RESPONDER); config.setInterpolator(ANIM_VERTICAL_PROGRESS, isTablet ? LINEAR_TELEPORT : LINEAR); } /** Loading @@ -125,7 +122,6 @@ public class AllAppsSwipeController extends AbstractStateChangeTouchController { config.setInterpolator(ANIM_SCRIM_FADE, ALLAPPS_STAGGERED_FADE_EARLY_RESPONDER); config.setInterpolator(ANIM_ALL_APPS_FADE, isTablet ? INSTANT : ALLAPPS_STAGGERED_FADE_LATE_RESPONDER); config.setInterpolator(ANIM_VERTICAL_PROGRESS, isTablet ? LINEAR_TELEPORT : LINEAR); } Loading