Merge "Pre-initializing filtered/apps list in case we get incremental updates before setApps(), adding additional null checks. (3465095)"
diff --git a/src/com/android/launcher2/CellLayoutChildren.java b/src/com/android/launcher2/CellLayoutChildren.java
index 0d0a339..76a6900 100644
--- a/src/com/android/launcher2/CellLayoutChildren.java
+++ b/src/com/android/launcher2/CellLayoutChildren.java
@@ -45,9 +45,6 @@
         super(context);
         mWallpaperManager = WallpaperManager.getInstance(context);
         setLayerType(LAYER_TYPE_HARDWARE, null);
-
-        // Disable multitouch for the workspace
-        setMotionEventSplittingEnabled(false);
     }
 
     public void setCellDimensions(int cellWidth, int cellHeight,
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);
 
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index cb95235..159e821 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -546,6 +546,11 @@
                         alpha = 1.0f;
                     }
 
+                    // Due to the way we're setting alpha on our children in PagedViewCellLayout,
+                    // this optimization causes alpha to not be properly updated sometimes (repro
+                    // case: in xlarge mode, swipe to second page in All Apps, then click on "My
+                    // Apps" tab. the page will have alpha 0 until you swipe it). Removing
+                    // optimization fixes the issue, but we should fix this in a better manner
                     //if (Float.compare(alpha, layout.getAlpha()) != 0) {
                         layout.setAlpha(alpha);
                     //}
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index c2063ab..38471df 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -262,6 +262,9 @@
         setHapticFeedbackEnabled(false);
 
         initWorkspace();
+
+        // Disable multitouch across the workspace/all apps/customize tray
+        setMotionEventSplittingEnabled(true);
     }
 
     /**