Make sure all transition components run on the same thread
-> The framework circular reveal transition runs on the render
thread which can cause problems when mixed in an AnimatorSet
with transitions that don't run on the render thread
-> See issue 17556455
issue 21445293
Change-Id: Ie19c184c55060651e817d426ec83049b06af56ba
diff --git a/src/com/android/launcher3/LauncherAnimUtils.java b/src/com/android/launcher3/LauncherAnimUtils.java
index 6ff7666..6a248a3 100644
--- a/src/com/android/launcher3/LauncherAnimUtils.java
+++ b/src/com/android/launcher3/LauncherAnimUtils.java
@@ -26,6 +26,9 @@
import android.view.View;
import android.view.ViewAnimationUtils;
import android.view.ViewTreeObserver;
+
+import com.android.launcher3.util.UiThreadCircularReveal;
+
import java.util.HashSet;
import java.util.WeakHashMap;
@@ -130,13 +133,11 @@
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
- public static Animator createCircularReveal(View view, int centerX,
+ public static ValueAnimator createCircularReveal(View view, int centerX,
int centerY, float startRadius, float endRadius) {
- Animator anim = ViewAnimationUtils.createCircularReveal(view, centerX,
+ ValueAnimator anim = UiThreadCircularReveal.createCircularReveal(view, centerX,
centerY, startRadius, endRadius);
- if (anim instanceof ValueAnimator) {
- new FirstFrameAnimatorHelper((ValueAnimator) anim, view);
- }
+ new FirstFrameAnimatorHelper(anim, view);
return anim;
}
}