Fix regression where StaggeredWorkspaceAnim didn't respect animateScrim

Before, this happened to work because we skipped setting the scrim when
doing an atomic animation, but the atomic animation code has been
removed. Add an explicit SKIP_SCRIM config flag instead.

Test: swipe up from overview to home, ensure scrim animates nicely

Bug: 185411781
Change-Id: I7bc14a11d9d416cc7336ea29d21107dcdbdbf782
This commit is contained in:
Tony Wickham
2021-04-14 14:51:03 -07:00
parent 63365cf034
commit 01320be908
3 changed files with 8 additions and 2 deletions

View File

@@ -40,6 +40,7 @@ import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_F
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_SCALE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_SCRIM_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_TRANSLATE;
import static com.android.launcher3.states.StateAnimationConfig.SKIP_SCRIM;
import android.animation.ValueAnimator;
import android.view.View;
@@ -151,7 +152,9 @@ public class WorkspaceStateTransitionAnimation {
propertySetter.setFloat(mWorkspace.getPageIndicator(), VIEW_TRANSLATE_Y,
hotseatScaleAndTranslation.translationY, hotseatTranslationInterpolator);
setScrim(propertySetter, state, config);
if (!config.hasAnimationFlag(SKIP_SCRIM)) {
setScrim(propertySetter, state, config);
}
}
/**