am 49779a15: Fix RuntimeException in LauncherViewPropertyAnimator

* commit '49779a155f8e7f752f6433db5e132ce8d01a1d9f':
  Fix RuntimeException in LauncherViewPropertyAnimator
This commit is contained in:
Michael Jurka
2012-01-17 10:21:08 -08:00
committed by Android Git Automerger
+8 -3
View File
@@ -2312,13 +2312,18 @@ public final class Launcher extends Activity
}
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);