Fix 3272584: home button should return to previous workspace

Change-Id: I8d019ae68c4b1a875d629683202ac73cdd8c3cf7
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index a80833e..55680f4 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1443,16 +1443,14 @@
             boolean alreadyOnHome = ((intent.getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT)
                         != Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
 
-            // in all these cases, only animate if we're already on home
+            // In all these cases, only animate if we're already on home
+
             if (LauncherApplication.isScreenXLarge()) {
                 mWorkspace.unshrink(alreadyOnHome);
             }
-            if (!mWorkspace.isDefaultPageShowing()) {
-                // on the phone, we don't animate the change to the workspace if all apps is visible
-                boolean animate = alreadyOnHome &&
-                    (LauncherApplication.isScreenXLarge() || mState != State.ALL_APPS);
-                mWorkspace.moveToDefaultScreen(animate);
-                if (!animate) mWorkspace.updateWallpaperOffsetImmediately();
+
+            if (alreadyOnHome && mState == State.WORKSPACE && !mWorkspace.isDefaultPageShowing()) {
+                mWorkspace.moveToDefaultScreen(true);
             }
             showWorkspace(alreadyOnHome);