diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java index adb025209c..3c83d25b71 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitStatesTouchController.java @@ -24,6 +24,7 @@ import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.anim.Interpolators.ACCEL; import static com.android.launcher3.anim.Interpolators.DEACCEL; import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE; +import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE; import android.view.MotionEvent; @@ -56,7 +57,17 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr /** * Minimum clamping progress for fading in all apps content */ - protected static final float ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD = 0.4f; + protected static final float ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD = 0.5f; + + /** + * Minimum clamping progress for fading in all apps scrim + */ + protected static final float ALL_APPS_SCRIM_VISIBLE_THRESHOLD = .1f; + + /** + * Maximum clamping progress for opaque all apps scrim + */ + protected static final float ALL_APPS_SCRIM_OPAQUE_THRESHOLD = .5f; private final PortraitOverviewStateTouchHelper mOverviewPortraitStateTouchHelper; @@ -116,14 +127,22 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr private StateAnimationConfig getNormalToAllAppsAnimation() { StateAnimationConfig builder = new StateAnimationConfig(); builder.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(ACCEL, - 0, ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD)); + ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD, + ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD)); + builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(ACCEL, + ALL_APPS_SCRIM_VISIBLE_THRESHOLD, + ALL_APPS_SCRIM_OPAQUE_THRESHOLD)); return builder; } private StateAnimationConfig getAllAppsToNormalAnimation() { StateAnimationConfig builder = new StateAnimationConfig(); builder.setInterpolator(ANIM_ALL_APPS_FADE, Interpolators.clampToProgress(DEACCEL, - 1 - ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD, 1)); + 1 - ALL_APPS_CONTENT_FADE_MAX_CLAMPING_THRESHOLD, + 1 - ALL_APPS_CONTENT_FADE_MIN_CLAMPING_THRESHOLD)); + builder.setInterpolator(ANIM_SCRIM_FADE, Interpolators.clampToProgress(DEACCEL, + 1 - ALL_APPS_SCRIM_OPAQUE_THRESHOLD, + 1 - ALL_APPS_SCRIM_VISIBLE_THRESHOLD)); return builder; } diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java index 7067dbcc0d..e4d148cb76 100644 --- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java +++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java @@ -20,7 +20,7 @@ import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_MO import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_SCALE; import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_X; import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_Y; -import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_SCRIM_FADE; +import static com.android.launcher3.states.StateAnimationConfig.ANIM_SCRIM_FADE; import static com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW; import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_OFFSET; import static com.android.quickstep.views.RecentsView.FULLSCREEN_PROGRESS; @@ -98,6 +98,6 @@ public class FallbackRecentsStateController implements StateHandler