OSDN Git Service

Fixes #1945905. Prevents the user from clicking the same button mutiple times.
authorRomain Guy <romainguy@android.com>
Fri, 26 Jun 2009 17:31:07 +0000 (10:31 -0700)
committerRomain Guy <romainguy@android.com>
Fri, 26 Jun 2009 17:31:07 +0000 (10:31 -0700)
src/com/android/launcher/Launcher.java

index 328a5ca..918ffaa 100644 (file)
@@ -614,9 +614,11 @@ public final class Launcher extends Activity implements View.OnClickListener, On
     }
 
     private void createGesture() {
-        mCurrentGesture = mGesturesOverlay.getGesture();
-        mWaitingForResult = true;
-        pickShortcut(REQUEST_PICK_GESTURE_ACTION, R.string.title_select_shortcut);
+        if (!mWaitingForResult) {
+            mCurrentGesture = mGesturesOverlay.getGesture();
+            mWaitingForResult = true;
+            pickShortcut(REQUEST_PICK_GESTURE_ACTION, R.string.title_select_shortcut);
+        }
     }
 
     private void completeCreateGesture(Intent data, boolean isShortcut) {