Fixing issue where widgets could not be picked up after the bind-dialog shows. (Bug 10332119)
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 890c632..7f130c0 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -647,6 +647,9 @@
     @Override
     protected void onActivityResult(
             final int requestCode, final int resultCode, final Intent data) {
+        // Reset the startActivity waiting flag
+        mWaitingForResult = false;
+
         if (requestCode == REQUEST_BIND_APPWIDGET) {
             int appWidgetId = data != null ?
                     data.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1) : -1;
@@ -660,7 +663,6 @@
         boolean delayExitSpringLoadedMode = false;
         boolean isWidgetDrop = (requestCode == REQUEST_PICK_APPWIDGET ||
                 requestCode == REQUEST_CREATE_APPWIDGET);
-        mWaitingForResult = false;
 
         // We have special handling for widgets
         if (isWidgetDrop) {