OSDN Git Service

Prevents BadTokenException on rotation of the gestures window.
authorRomain Guy <romainguy@android.com>
Fri, 17 Jul 2009 23:36:31 +0000 (16:36 -0700)
committerRomain Guy <romainguy@android.com>
Fri, 17 Jul 2009 23:36:31 +0000 (16:36 -0700)
src/com/android/launcher/Launcher.java

index bf2be91..25ad4e5 100644 (file)
@@ -601,11 +601,11 @@ public final class Launcher extends Activity implements View.OnClickListener, On
             mWorkspace.post(new Runnable() {
                 public void run() {
                     showGesturesPanel(false);
-                    if (gesture != null) {
+                    if (gesture != null && mWorkspace.getParent() != null) {
                         mGesturesProcessor.matchGesture(gesture);
                         mWorkspace.post(new Runnable() {
                             public void run() {
-                                if (gesture != null) {
+                                if (gesture != null && mWorkspace.getParent() != null) {
                                     mGesturesOverlay.setGesture(gesture);
                                 }
                             }