merge in honeycomb-release history after reset to honeycomb
diff --git a/res/drawable-xlarge-mdpi/app_market_generic.png b/res/drawable-xlarge-mdpi/app_market_generic.png
index 355ea6a..6eb5497 100644
--- a/res/drawable-xlarge-mdpi/app_market_generic.png
+++ b/res/drawable-xlarge-mdpi/app_market_generic.png
Binary files differ
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 9b173be..6767cf1 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -483,10 +483,6 @@
         return mCountY;
     }
 
-    public boolean addViewToCellLayout(View child, int index, int childId, LayoutParams params) {
-        return addViewToCellLayout(child, index, childId, params, true);
-    }
-
     public boolean addViewToCellLayout(
             View child, int index, int childId, LayoutParams params, boolean markCells) {
         final LayoutParams lp = params;
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 1733ddb..f3208d0 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -3333,8 +3333,8 @@
         int count = workspace.getChildCount();
         for (int i = 0; i < count; i++) {
             // Use removeAllViewsInLayout() to avoid an extra requestLayout() and invalidate().
-            final ViewGroup layout = ((CellLayout) workspace.getChildAt(i)).getChildrenLayout();
-            layout.removeAllViewsInLayout();
+            final CellLayout layoutParent = (CellLayout) workspace.getChildAt(i);
+            layoutParent.removeAllViewsInLayout();
         }
 
         if (DEBUG_USER_INTERFACE) {
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index ede029b..92b09f4 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -233,6 +233,10 @@
         return getWidth();
     }
 
+    public int getTouchState() {
+        return mTouchState;
+    }
+
     /**
      * Updates the scroll of the current page immediately to its final scroll position.  We use this
      * in CustomizePagedView to allow tabs to share the same PagedView while resetting the scroll of
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 004de3a..890bde8 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -544,6 +544,11 @@
                     mShrinkState == ShrinkState.BOTTOM_HIDDEN) {
                 // Intercept this event so we can show the workspace in full view
                 // when it is clicked on and it is small
+                AllAppsPagedView allApps = (AllAppsPagedView)
+                        mLauncher.findViewById(R.id.all_apps_paged_view);
+                if (allApps != null) {
+                    allApps.onInterceptTouchEvent(ev);
+                }
                 return true;
             }
             return false;
@@ -1206,22 +1211,29 @@
 
     @Override
     public boolean onTouchEvent(MotionEvent ev) {
-        if (mLauncher.isAllAppsVisible()) {
-            // Cancel any scrolling that is in progress.
-            if (!mScroller.isFinished()) {
-                mScroller.abortAnimation();
-            }
-            setCurrentPage(mCurrentPage);
+        AllAppsPagedView allApps = (AllAppsPagedView)
+                mLauncher.findViewById(R.id.all_apps_paged_view);
 
-            if (mShrinkState == ShrinkState.BOTTOM_HIDDEN) {
-                mLauncher.showWorkspace(true);
-                // Let the events fall through to the CellLayouts because if they are not
-                // hit, then we get a crash due to a missing ACTION_DOWN touch event
-            }
+        if (mLauncher.isAllAppsVisible() && mShrinkState == ShrinkState.BOTTOM_HIDDEN
+                && allApps != null) {
+            if (ev.getAction() == MotionEvent.ACTION_UP &&
+                    allApps.getTouchState() == TOUCH_STATE_REST) {
 
-            return false; // We don't want the events
+                // Cancel any scrolling that is in progress.
+                if (!mScroller.isFinished()) {
+                    mScroller.abortAnimation();
+                }
+                setCurrentPage(mCurrentPage);
+
+                if (mShrinkState == ShrinkState.BOTTOM_HIDDEN) {
+                    mLauncher.showWorkspace(true);
+                }
+                allApps.onTouchEvent(ev);
+                return true;
+            } else {
+                return allApps.onTouchEvent(ev);
+            }
         }
-
         return super.onTouchEvent(ev);
     }
 
@@ -2824,7 +2836,8 @@
         }
 
         for (int i = 0; i < screenCount; i++) {
-            final ViewGroup layout = ((CellLayout) getChildAt(i)).getChildrenLayout();
+            final CellLayout layoutParent = (CellLayout) getChildAt(i);
+            final ViewGroup layout = layoutParent.getChildrenLayout();
 
             // Avoid ANRs by treating each screen separately
             post(new Runnable() {
@@ -2911,7 +2924,9 @@
                     childCount = childrenToRemove.size();
                     for (int j = 0; j < childCount; j++) {
                         View child = childrenToRemove.get(j);
-                        layout.removeViewInLayout(child);
+                        // Note: We can not remove the view directly from CellLayoutChildren as this
+                        // does not re-mark the spaces as unoccupied.
+                        layoutParent.removeViewInLayout(child);
                         if (child instanceof DropTarget) {
                             mDragController.removeDropTarget((DropTarget)child);
                         }