Merge "Ensuring that we don't clobber workspace screens map when new apps are added." into jb-ub-gel-agar
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 876b2f6..ab2bc67 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) {