summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherAnimUtils.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2015-05-26 23:03:31 -0700
committerAdam Cohen <adamcohen@google.com>2015-05-27 13:55:09 -0700
commit1558893b873cd55b2df779f594f1de3c370d3328 (patch)
treedc79aa6ae27c704d74ce904a9860c9ae320e898c /src/com/android/launcher3/LauncherAnimUtils.java
parentbbcf5ac7aa73a3ce07215d77a0b496cf7fb00f29 (diff)
downloadandroid_packages_apps_Trebuchet-1558893b873cd55b2df779f594f1de3c370d3328.tar.gz
android_packages_apps_Trebuchet-1558893b873cd55b2df779f594f1de3c370d3328.tar.bz2
android_packages_apps_Trebuchet-1558893b873cd55b2df779f594f1de3c370d3328.zip
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
Diffstat (limited to 'src/com/android/launcher3/LauncherAnimUtils.java')
-rw-r--r--src/com/android/launcher3/LauncherAnimUtils.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/android/launcher3/LauncherAnimUtils.java b/src/com/android/launcher3/LauncherAnimUtils.java
index 6ff76665c..6a248a332 100644
--- a/src/com/android/launcher3/LauncherAnimUtils.java
+++ b/src/com/android/launcher3/LauncherAnimUtils.java
@@ -26,6 +26,9 @@ import android.os.Build;
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 @@ public class LauncherAnimUtils {
}
@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;
}
}