Merge commit '5c6bdbbc27525acc8c49cea6a1de36723a13fac7' into manual_merge_5c6bdbbc

Change-Id: I508bce36edca28ed565338e5173b64eba14e89d4
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 38f84df..fd744dc 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1560,7 +1560,10 @@
                 // processing a multi-step drop
                 if (mAppsView != null && mWidgetsView != null &&
                         mPendingAddInfo.container == ItemInfo.NO_ID) {
-                    showWorkspace(false);
+                    if (!showWorkspace(false)) {
+                        // If we are already on the workspace, then manually reset all apps
+                        mAppsView.reset();
+                    }
                 }
             } else if (Intent.ACTION_USER_PRESENT.equals(action)) {
                 mUserPresent = true;
@@ -3194,11 +3197,11 @@
         }
     }
 
-    public void showWorkspace(boolean animated) {
-        showWorkspace(animated, null);
+    public boolean showWorkspace(boolean animated) {
+        return showWorkspace(animated, null);
     }
 
-    public void showWorkspace(boolean animated, Runnable onCompleteRunnable) {
+    public boolean showWorkspace(boolean animated, Runnable onCompleteRunnable) {
         boolean changed = mState != State.WORKSPACE ||
                 mWorkspace.getState() != Workspace.State.NORMAL;
         if (changed) {
@@ -3224,6 +3227,7 @@
             getWindow().getDecorView()
                     .sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
         }
+        return changed;
     }
 
     void showOverviewMode(boolean animated) {