am 49779a15: Fix RuntimeException in LauncherViewPropertyAnimator
* commit '49779a155f8e7f752f6433db5e132ce8d01a1d9f':
Fix RuntimeException in LauncherViewPropertyAnimator
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 45a9e31..33ca887 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2312,13 +2312,18 @@
}
if (delayAnim) {
+ final AnimatorSet stateAnimation = mStateAnimation;
final OnGlobalLayoutListener delayedStart = new OnGlobalLayoutListener() {
public void onGlobalLayout() {
mWorkspace.post(new Runnable() {
public void run() {
- // Need to update pivots for zoom if layout changed
- setPivotsForZoom(toView, scale);
- mStateAnimation.start();
+ // Check that mStateAnimation hasn't changed while
+ // we waited for a layout pass
+ if (mStateAnimation == stateAnimation) {
+ // Need to update pivots for zoom if layout changed
+ setPivotsForZoom(toView, scale);
+ mStateAnimation.start();
+ }
}
});
observer.removeGlobalOnLayoutListener(this);