OSDN Git Service

Fix NPE
authorMichael Jurka <mikejurka@google.com>
Mon, 11 Jun 2012 22:42:07 +0000 (15:42 -0700)
committerMichael Jurka <mikejurka@google.com>
Mon, 11 Jun 2012 23:30:55 +0000 (16:30 -0700)
Bug: 6643246

Change-Id: I0b3fed0fa4e4fc5f4e1eccc97c0ec8f23e55024d

src/com/android/launcher2/Launcher.java

index 28dfd65..5432484 100644 (file)
@@ -2488,7 +2488,7 @@ public final class Launcher extends Activity
                     setPivotsForZoom(toView, scale);
                     dispatchOnLauncherTransitionStart(fromView, animated, false);
                     dispatchOnLauncherTransitionStart(toView, animated, false);
-                    mWorkspace.post(new Runnable() {
+                    toView.post(new Runnable() {
                         public void run() {
                             // Check that mStateAnimation hasn't changed while
                             // we waited for a layout/draw pass
@@ -2502,7 +2502,7 @@ public final class Launcher extends Activity
             if (delayAnim) {
                 final OnGlobalLayoutListener delayedStart = new OnGlobalLayoutListener() {
                     public void onGlobalLayout() {
-                        mWorkspace.post(startAnimRunnable);
+                        toView.post(startAnimRunnable);
                         observer.removeOnGlobalLayoutListener(this);
                     }
                 };