From 3f6c0ee7f5c75410dfe9e05f31fdb71b21ceecd3 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Mon, 28 Mar 2016 16:43:20 -0700 Subject: [PATCH] Invalidate scrim throughout animation from overlay to workspace. Bug: 27135377 Change-Id: I19e947ac271063beaa6c5d11906631d0afcbb781 --- .../launcher3/LauncherStateTransitionAnimation.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.java index 8855cf037f..c5ae9da8e4 100644 --- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java +++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java @@ -697,6 +697,17 @@ public class LauncherStateTransitionAnimation { itemsAlpha.setInterpolator(decelerateInterpolator); animation.play(itemsAlpha); + // Invalidate the scrim throughout the animation to ensure the highlight + // cutout is correct throughout. + ValueAnimator invalidateScrim = ValueAnimator.ofFloat(0f, 1f); + invalidateScrim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { + @Override + public void onAnimationUpdate(ValueAnimator animation) { + mLauncher.getDragLayer().invalidateScrim(); + } + }); + animation.play(invalidateScrim); + if (material) { // Animate the all apps button float finalRadius = pCb.getMaterialRevealViewStartFinalRadius();