merge in ics-release history after reset to master
diff --git a/res/layout-large/all_apps_tabbed.xml b/res/layout-large/all_apps_tabbed.xml
index 1a20440..4194069 100644
--- a/res/layout-large/all_apps_tabbed.xml
+++ b/res/layout-large/all_apps_tabbed.xml
@@ -55,6 +55,7 @@
                     android:focusable="true" />
                 <TextView
                     android:id="@+id/market_button"
+                    android:onClick="onClickAppMarketButton"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
@@ -68,7 +69,8 @@
                     android:shadowDy="0.0"
                     android:shadowRadius="2.0"
                     android:background="@drawable/focusable_view_bg"
-                    android:focusable="true" />
+                    android:focusable="true"
+                    android:clickable="true" />
             </FrameLayout>
             <com.android.launcher2.DeleteZone
                 android:id="@+id/all_apps_delete_zone"
diff --git a/res/layout/apps_customize_pane.xml b/res/layout/apps_customize_pane.xml
index 7083bf8..604dff4 100644
--- a/res/layout/apps_customize_pane.xml
+++ b/res/layout/apps_customize_pane.xml
@@ -67,12 +67,14 @@
                 <TextView
                     style="@style/MarketButton"
                     android:id="@+id/market_button"
+                    android:onClick="onClickAppMarketButton"
                     android:layout_width="wrap_content"
                     android:layout_height="match_parent"
                     android:layout_gravity="center"
                     android:gravity="center"
                     android:background="@drawable/tab_widget_indicator_selector"
-                    android:focusable="true" />
+                    android:focusable="true"
+                    android:clickable="true" />
             </FrameLayout>
         </FrameLayout>
         <FrameLayout
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 401e8ad..7c6742f 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -21,13 +21,12 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.xmlpull.v1.XmlPullParser;
-
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.animation.AnimatorSet;
 import android.animation.ObjectAnimator;
 import android.animation.PropertyValuesHolder;
+import android.animation.ValueAnimator;
 import android.appwidget.AppWidgetManager;
 import android.appwidget.AppWidgetProviderInfo;
 import android.content.ComponentName;
@@ -38,7 +37,6 @@
 import android.content.pm.ResolveInfo;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
-import android.content.res.XmlResourceParser;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap.Config;
 import android.graphics.Canvas;
@@ -47,9 +45,6 @@
 import android.util.AttributeSet;
 import android.util.Log;
 import android.util.LruCache;
-import android.util.Slog;
-import android.util.TypedValue;
-import android.util.Xml;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -299,31 +294,21 @@
                 }
             });
         } else if (v instanceof PagedViewWidget) {
-            // Add the widget to the current workspace screen
-            Workspace w = mLauncher.getWorkspace();
-            int currentWorkspaceScreen = mLauncher.getCurrentWorkspaceScreen();
-            final CellLayout cl = (CellLayout) w.getChildAt(currentWorkspaceScreen);
-            final View dragView = v.findViewById(R.id.widget_preview);
-            final ItemInfo itemInfo = (ItemInfo) v.getTag();
-            animateClickFeedback(v, new Runnable() {
-                @Override
-                public void run() {
-                    cl.calculateSpans(itemInfo);
-                    if (cl.findCellForSpan(null, itemInfo.spanX, itemInfo.spanY)) {
-                        if (LauncherApplication.isScreenLarge()) {
-                            animateItemOntoScreen(dragView, cl, itemInfo);
-                        } else {
-                            mLauncher.addExternalItemToScreen(itemInfo, cl);
-                            itemInfo.dropPos = null;
-                        }
+            // Let the user know that they have to long press to add a widget
+            Toast.makeText(getContext(), R.string.long_press_widget_to_add,
+                    Toast.LENGTH_SHORT).show();
 
-                        // Hide the pane so we can see the workspace we dropped on
-                        mLauncher.showWorkspace(true);
-                    } else {
-                        mLauncher.showOutOfSpaceMessage();
-                    }
-                }
-            });
+            // Create a little animation to show that the widget can move
+            float offsetY = getResources().getDimensionPixelSize(R.dimen.dragViewOffsetY);
+            final ImageView p = (ImageView) v.findViewById(R.id.widget_preview);
+            AnimatorSet bounce = new AnimatorSet();
+            ValueAnimator tyuAnim = ObjectAnimator.ofFloat(p, "translationY", offsetY);
+            tyuAnim.setDuration(125);
+            ValueAnimator tydAnim = ObjectAnimator.ofFloat(p, "translationY", 0f);
+            tydAnim.setDuration(100);
+            bounce.play(tyuAnim).before(tydAnim);
+            bounce.setInterpolator(new AccelerateInterpolator());
+            bounce.start();
         }
     }
 
@@ -543,7 +528,7 @@
             PagedViewIcon icon = (PagedViewIcon) mLayoutInflater.inflate(
                     R.layout.apps_customize_application, layout, false);
             icon.applyFromApplicationInfo(
-                    info, mPageViewIconCache, true, isHardwareAccelerated() && (numPages > 1));
+                    info, mPageViewIconCache, true, (numPages > 1));
             icon.setOnClickListener(this);
             icon.setOnLongClickListener(this);
             icon.setOnTouchListener(this);
@@ -714,6 +699,7 @@
 
         // Calculate the dimensions of each cell we are giving to each widget
         int numWidgetsPerPage = mWidgetCountX * mWidgetCountY;
+        int numPages = (int) Math.ceil(mWidgets.size() / (float) numWidgetsPerPage);
         int offset = page * numWidgetsPerPage;
         int cellWidth = ((mWidgetSpacingLayout.getContentWidth() - mPageLayoutWidthGap
                 - ((mWidgetCountX - 1) * mCellWidthGap)) / mWidgetCountX);
@@ -732,7 +718,8 @@
                         info.minHeight, null);
                 FastBitmapDrawable preview = getWidgetPreview(info, cellSpans[0], cellSpans[1],
                         cellWidth, cellHeight);
-                widget.applyFromAppWidgetProviderInfo(info, preview, -1, cellSpans, null, false);
+                widget.applyFromAppWidgetProviderInfo(info, preview, -1, cellSpans, 
+                        mPageViewIconCache, (numPages > 1));
                 widget.setTag(createItemInfo);
             } else if (rawInfo instanceof ResolveInfo) {
                 // Fill in the shortcuts information
@@ -742,7 +729,8 @@
                 createItemInfo.componentName = new ComponentName(info.activityInfo.packageName,
                         info.activityInfo.name);
                 FastBitmapDrawable preview = getShortcutPreview(info, cellWidth, cellHeight);
-                widget.applyFromResolveInfo(mPackageManager, info, preview, null, false);
+                widget.applyFromResolveInfo(mPackageManager, info, preview, mPageViewIconCache, 
+                        (numPages > 1));
                 widget.setTag(createItemInfo);
             }
             widget.setOnClickListener(this);
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 48869d3..eb533fe 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -950,11 +950,6 @@
             // Setup the AllApps Market toolbar button
             View marketButton = findViewById(R.id.market_button);
             allAppsInfoTarget.setOverlappingView(marketButton);
-            marketButton.setOnClickListener(new OnClickListener() {
-                public void onClick(View v) {
-                    onClickAppMarketButton(v);
-                }
-            });
         } else {
             // Get the search/delete bar
             mSearchDeleteBar = (SearchDropTargetBar) mDragLayer.findViewById(R.id.qsb_bar);