From baf94181f77eff05db6253db57a6eb287641ce3e Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 20 Aug 2014 08:36:42 -0700 Subject: [PATCH] Don't use Animator:reverse() Bug: 17137979 Change-Id: I048611c363c947020d2e703bdf521f018f8ca614 --- .../src/com/android/systemui/qs/QSDetailClipper.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java b/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java index 9c1ff9d7a5ac9..eb4560da1a891 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSDetailClipper.java @@ -46,7 +46,11 @@ public class QSDetailClipper { r = (int) Math.max(r, Math.ceil(Math.sqrt(w * w + y * y))); r = (int) Math.max(r, Math.ceil(Math.sqrt(w * w + h * h))); r = (int) Math.max(r, Math.ceil(Math.sqrt(x * x + h * h))); - mAnimator = ViewAnimationUtils.createCircularReveal(mDetail, x, y, 0, r); + if (in) { + mAnimator = ViewAnimationUtils.createCircularReveal(mDetail, x, y, 0, r); + } else { + mAnimator = ViewAnimationUtils.createCircularReveal(mDetail, x, y, r, 0); + } mAnimator.setDuration((long)(mAnimator.getDuration() * 1.5)); if (listener != null) { mAnimator.addListener(listener); @@ -55,12 +59,11 @@ public class QSDetailClipper { if (in) { mBackground.startTransition((int)(mAnimator.getDuration() * 0.6)); mAnimator.addListener(mVisibleOnStart); - mAnimator.start(); } else { mDetail.postDelayed(mReverseBackground, (long)(mAnimator.getDuration() * 0.65)); mAnimator.addListener(mGoneOnEnd); - mAnimator.reverse(); } + mAnimator.start(); } private final Runnable mReverseBackground = new Runnable() {