diff --git a/Android.mk b/Android.mk
index a9fa30a..00a8977 100644
--- a/Android.mk
+++ b/Android.mk
@@ -17,7 +17,7 @@
 LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 
-#LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 
diff --git a/res/drawable-hdpi/ic_search_widget.png b/res/drawable-hdpi/ic_search_widget.png
deleted file mode 100644
index 06b9b25..0000000
--- a/res/drawable-hdpi/ic_search_widget.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/search_button_bg.9.png b/res/drawable-hdpi/search_button_bg.9.png
deleted file mode 100644
index 9fba3d1..0000000
--- a/res/drawable-hdpi/search_button_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/search_button_voice.png b/res/drawable-hdpi/search_button_voice.png
deleted file mode 100644
index a60f7d9..0000000
--- a/res/drawable-hdpi/search_button_voice.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/search_floater.9.png b/res/drawable-hdpi/search_floater.9.png
deleted file mode 100644
index 02441d0..0000000
--- a/res/drawable-hdpi/search_floater.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/textfield_searchwidget_default.9.png b/res/drawable-hdpi/textfield_searchwidget_default.9.png
deleted file mode 100644
index 2fe637d..0000000
--- a/res/drawable-hdpi/textfield_searchwidget_default.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/textfield_searchwidget_pressed.9.png b/res/drawable-hdpi/textfield_searchwidget_pressed.9.png
deleted file mode 100644
index 58af9ba..0000000
--- a/res/drawable-hdpi/textfield_searchwidget_pressed.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/textfield_searchwidget_selected.9.png b/res/drawable-hdpi/textfield_searchwidget_selected.9.png
deleted file mode 100644
index 8a84fdc..0000000
--- a/res/drawable-hdpi/textfield_searchwidget_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/textfield_searchwidget.xml b/res/drawable/textfield_searchwidget.xml
deleted file mode 100644
index 80f3dca..0000000
--- a/res/drawable/textfield_searchwidget.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    
-﻿   <item android:state_window_focused="false" android:state_enabled="true"
-        android:drawable="@drawable/textfield_searchwidget_default" />
-    
-    <item android:state_pressed="true"
-        android:drawable="@drawable/textfield_searchwidget_pressed" />
-    
-    <item android:state_enabled="true" android:state_focused="true"
-        android:drawable="@drawable/textfield_searchwidget_selected" />
-    
-    <item android:state_enabled="true"
-        android:drawable="@drawable/textfield_searchwidget_default" />
-    
-</selector>
diff --git a/res/layout-land/application_boxed.xml b/res/layout-land/application_boxed.xml
index 7656b58..dc62361 100644
--- a/res/layout-land/application_boxed.xml
+++ b/res/layout-land/application_boxed.xml
@@ -16,7 +16,7 @@
 
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/name"
-    android:layout_width="fill_parent"
+    android:layout_width="match_parent"
     android:layout_height="88dip"
 
     android:paddingLeft="2dip"
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index d2009b8..da944b7 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -19,13 +19,13 @@
     xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2"
 
     android:id="@+id/drag_layer"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
 
     <com.android.launcher2.AllAppsView
         android:id="@+id/all_apps_view"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
 
         android:scrollbarStyle="outsideInset"
         android:drawSelectorOnTop="false"
@@ -37,8 +37,8 @@
     <!-- The workspace contains 3 screens of cells -->
     <com.android.launcher2.Workspace
         android:id="@+id/workspace"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
         android:scrollbars="horizontal"
         android:fadeScrollbars="true"
         launcher:defaultScreen="2">
@@ -82,7 +82,7 @@
     <com.android.launcher2.HandleView
         android:id="@+id/all_apps_button"
         android:layout_width="@dimen/button_bar_height"
-        android:layout_height="fill_parent"
+        android:layout_height="match_parent"
         android:layout_gravity="right|center_vertical"
 
         android:focusable="true"
@@ -96,7 +96,7 @@
     <com.android.launcher2.DeleteZone
         android:id="@+id/delete_zone"
         android:layout_width="49dip"
-        android:layout_height="fill_parent"
+        android:layout_height="match_parent"
 
         android:scaleType="center"
         android:src="@drawable/delete_zone_selector"
diff --git a/res/layout-land/live_folder_grid.xml b/res/layout-land/live_folder_grid.xml
index 572c295..44519d4 100644
--- a/res/layout-land/live_folder_grid.xml
+++ b/res/layout-land/live_folder_grid.xml
@@ -27,12 +27,12 @@
         android:textSize="14sp"
         android:textColor="#404040"
         android:textStyle="bold"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="wrap_content" />
 
     <GridView
         android:id="@+id/folder_content"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="0dip"
     	android:layout_weight="1"
             
diff --git a/res/layout-land/user_folder.xml b/res/layout-land/user_folder.xml
index 645c02f..b05974a 100644
--- a/res/layout-land/user_folder.xml
+++ b/res/layout-land/user_folder.xml
@@ -24,12 +24,12 @@
         android:textSize="14sp"
         android:textColor="#404040"
         android:textStyle="bold"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="wrap_content" />
 
     <GridView
         android:id="@id/folder_content"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="0dip"
     	android:layout_weight="1"
             
diff --git a/res/layout-land/workspace_screen.xml b/res/layout-land/workspace_screen.xml
index 531bac2..299478e 100644
--- a/res/layout-land/workspace_screen.xml
+++ b/res/layout-land/workspace_screen.xml
@@ -18,8 +18,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2"
 
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
 
     launcher:cellWidth="@dimen/workspace_cell_width"
     launcher:cellHeight="@dimen/workspace_cell_height"
diff --git a/res/layout-port/application_boxed.xml b/res/layout-port/application_boxed.xml
index a6991d5..5e64cee 100644
--- a/res/layout-port/application_boxed.xml
+++ b/res/layout-port/application_boxed.xml
@@ -16,7 +16,7 @@
 
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/name"
-    android:layout_width="fill_parent"
+    android:layout_width="match_parent"
     android:layout_height="88dip"
 
     android:paddingLeft="2dip"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index 001f3e3..f73e91c 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -19,13 +19,13 @@
     xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2"
 
     android:id="@+id/drag_layer"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
 
     <com.android.launcher2.AllAppsView
         android:id="@+id/all_apps_view"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
 
         android:scrollbarStyle="outsideInset"
         android:drawSelectorOnTop="false"
@@ -38,8 +38,8 @@
     <!-- The workspace contains 3 screens of cells -->
     <com.android.launcher2.Workspace
         android:id="@+id/workspace"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
         launcher:defaultScreen="2">
 
         <include android:id="@+id/cell1" layout="@layout/workspace_screen" />
diff --git a/res/layout-port/live_folder_grid.xml b/res/layout-port/live_folder_grid.xml
index 51e5e47..745307f 100644
--- a/res/layout-port/live_folder_grid.xml
+++ b/res/layout-port/live_folder_grid.xml
@@ -27,12 +27,12 @@
         android:textSize="14sp"
         android:textColor="#404040"
         android:textStyle="bold"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="wrap_content" />
 
     <GridView
         android:id="@id/folder_content"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="0dip"
     	android:layout_weight="1"
 
diff --git a/res/layout-port/user_folder.xml b/res/layout-port/user_folder.xml
index 6a189dc..7377cde 100644
--- a/res/layout-port/user_folder.xml
+++ b/res/layout-port/user_folder.xml
@@ -24,12 +24,12 @@
         android:textSize="14sp"
         android:textColor="#404040"
         android:textStyle="bold"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="wrap_content" />
 
     <GridView
         android:id="@id/folder_content"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="0dip"
     	android:layout_weight="1"
 
diff --git a/res/layout-port/workspace_screen.xml b/res/layout-port/workspace_screen.xml
index 531bac2..299478e 100644
--- a/res/layout-port/workspace_screen.xml
+++ b/res/layout-port/workspace_screen.xml
@@ -18,8 +18,8 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2"
 
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
 
     launcher:cellWidth="@dimen/workspace_cell_width"
     launcher:cellHeight="@dimen/workspace_cell_height"
diff --git a/res/layout/add_list_item.xml b/res/layout/add_list_item.xml
index f276511..62fc4f4 100644
--- a/res/layout/add_list_item.xml
+++ b/res/layout/add_list_item.xml
@@ -15,7 +15,7 @@
 -->
 
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:textAppearance="?android:attr/textAppearanceLargeInverse"
diff --git a/res/layout/application_list.xml b/res/layout/application_list.xml
index 29f7400..b515c9e 100644
--- a/res/layout/application_list.xml
+++ b/res/layout/application_list.xml
@@ -18,7 +18,7 @@
 -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
+    android:layout_width="match_parent"
     android:layout_height="?android:attr/listPreferredItemHeight"
 
     android:paddingLeft="10dip"
@@ -34,7 +34,7 @@
     <LinearLayout
         android:layout_width="0dip"
         android:layout_weight="1.0"
-        android:layout_height="fill_parent"
+        android:layout_height="match_parent"
 
         android:paddingLeft="8dip"
         android:paddingRight="8dip"
diff --git a/res/layout/list_checkbox_2lines.xml b/res/layout/list_checkbox_2lines.xml
index ed80c5f..1debcd6 100644
--- a/res/layout/list_checkbox_2lines.xml
+++ b/res/layout/list_checkbox_2lines.xml
@@ -15,7 +15,7 @@
 -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:gravity="center_vertical"
diff --git a/res/layout/live_folder_list.xml b/res/layout/live_folder_list.xml
index cf3d2f1..e5a305f 100644
--- a/res/layout/live_folder_list.xml
+++ b/res/layout/live_folder_list.xml
@@ -27,12 +27,12 @@
         android:textSize="14sp"
         android:textColor="#404040"
         android:textStyle="bold"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="wrap_content" />
 
     <ListView
         android:id="@id/folder_content"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
     	android:layout_height="0dip"
     	android:layout_weight="1"
 
diff --git a/res/layout/pick_item.xml b/res/layout/pick_item.xml
index f276511..62fc4f4 100644
--- a/res/layout/pick_item.xml
+++ b/res/layout/pick_item.xml
@@ -15,7 +15,7 @@
 -->
 
 <TextView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:minHeight="?android:attr/listPreferredItemHeight"
     android:textAppearance="?android:attr/textAppearanceLargeInverse"
diff --git a/res/layout/rename_folder.xml b/res/layout/rename_folder.xml
index cbb42b4..75eb504 100644
--- a/res/layout/rename_folder.xml
+++ b/res/layout/rename_folder.xml
@@ -15,7 +15,7 @@
 -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:padding="20dip"
     android:orientation="vertical">
@@ -31,7 +31,7 @@
     <EditText
         android:id="@+id/folder_name"
         android:layout_height="wrap_content"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
         android:scrollHorizontally="true"
         android:autoText="false"
         android:capitalize="none"
diff --git a/res/layout/wallpaper_chooser.xml b/res/layout/wallpaper_chooser.xml
index 7267246..92a6596 100644
--- a/res/layout/wallpaper_chooser.xml
+++ b/res/layout/wallpaper_chooser.xml
@@ -20,17 +20,17 @@
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
 
     <ImageView android:id="@+id/wallpaper"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
         android:layout_height="0dip"
         android:layout_weight="1.0"
         android:scaleType="fitCenter" />
 
     <Gallery android:id="@+id/gallery"
-        android:layout_width="fill_parent"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content" />
         
     <Button android:id="@+id/set"
diff --git a/res/layout/widget_search.xml b/res/layout/widget_search.xml
deleted file mode 100644
index a346723..0000000
--- a/res/layout/widget_search.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<com.android.launcher2.Search 
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher2"
-    android:id="@+id/widget_search"  
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:orientation="vertical"
-    android:gravity="center">
-
-    <LinearLayout
-        android:id="@+id/search_plate"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:paddingLeft="14dip"
-        android:paddingRight="14dip"
-        android:paddingTop="13dip"
-        android:paddingBottom="12dip"
-        android:background="@drawable/search_floater" >
-
-        <TextView
-            android:id="@+id/search_src_text"
-            android:layout_width="0dip"
-            android:layout_height="42dip"
-            android:layout_weight="1.0"
-            android:editable="false"
-            android:focusable="true"
-            android:inputType="none"
-            android:background="@drawable/textfield_searchwidget"
-            android:textAppearance="?android:attr/textAppearanceMediumInverse"
-            android:textColor="@android:color/primary_text_light"
-        />
-        
-        <ImageButton 
-            android:id="@+id/search_voice_btn"
-            android:layout_width="wrap_content"
-            android:layout_height="42dip"
-            android:layout_marginLeft="4dip"
-            android:background="@*android:drawable/btn_search_dialog_voice"
-            android:src="@*android:drawable/ic_btn_speak_now"
-        />
-
-    </LinearLayout>
-
-</com.android.launcher2.Search>
diff --git a/res/raw/rollo3.c b/res/raw/allapps.rs
similarity index 67%
rename from res/raw/rollo3.c
rename to res/raw/allapps.rs
index aa7e075..abcf0dc 100644
--- a/res/raw/rollo3.c
+++ b/res/raw/allapps.rs
@@ -106,7 +106,7 @@
     if (g_LastTouchDown) {
         float dx = -(state->newPositionX - g_LastPositionX);
         g_PosVelocity = 0;
-        g_PosPage += dx * 4;
+        g_PosPage += dx * 5.2f;
 
         float pmin = -0.49f;
         float pmax = g_PosMax + 0.49f;
@@ -250,40 +250,6 @@
     g_PosPage = clampf(g_PosPage, -0.49, g_PosMax + 0.49);
 }
 
-int positionStrip(float row, float column, int isTop, float p, int isText)
-{
-    float mat1[16];
-    float x = 0.5f * (column - 1.5f);
-    float scale = 72.f * 3 / getWidth();
-
-    if (isTop) {
-        matrixLoadTranslate(mat1, x, 0.8f, 0.f);
-        matrixScale(mat1, scale, scale, 1.f);
-    } else {
-        matrixLoadTranslate(mat1, x, -0.9f, 0.f);
-        matrixScale(mat1, scale, -scale, 1.f);
-    }
-    matrixTranslate(mat1, 0, p * 2, 0.f);
-    matrixRotate(mat1, -p * 50, 1, 0, 0);
-    vpLoadModelMatrix(mat1);
-
-    float soff = -(row * 1.4);
-    if (isTop) {
-        matrixLoadScale(mat1, 1.f, -0.85f, 1.f);
-        if (isText) {
-            matrixScale(mat1, 1.f, 2.f, 1.f);
-        }
-        matrixTranslate(mat1, 0, soff - 0.95f + 0.18f, 0);
-    } else {
-        matrixLoadScale(mat1, 1.f, 0.85f, 1.f);
-        if (isText) {
-            matrixScale(mat1, 1.f, 2.f, 1.f);
-        }
-        matrixTranslate(mat1, 0, soff - 0.65f, 0);
-    }
-    vpLoadTextureMatrix(mat1);
-    return -(soff + 0.3f) * 10.f;
-}
 
 void
 draw_home_button()
@@ -306,20 +272,16 @@
     float rowFrac = rowOffset - intRowOffset;
     float colWidth = getWidth() / 4;
     float rowHeight = colWidth + 25.f;
-    float yoff = h - ((h - (rowHeight * 4.f)) / 2);
-
-    yoff -= 110;
+    float yoff = 0.5f * h + 1.5f * rowHeight;
 
     int row, col;
-    int iconNum = intRowOffset * 4;
-    float ymax = yoff + rowHeight;
-    float ymin = yoff - (3 * rowHeight) - 70;
-    float gridTop = yoff -3;
-    float gridBottom = ymin;
+    int iconNum = (intRowOffset - 5) * 4;
 
-    gridBottom += 50;
+    bindProgramVertex(NAMED_PVCurve);
 
-    for (row = 0; row < 5; row++) {
+    storeF(ALLOC_VP_CONSTANTS, 4, p);
+
+    for (row = -5; row < 15; row++) {
         float y = yoff - ((-rowFrac + row) * rowHeight);
 
         for (col=0; col < 4; col++) {
@@ -328,100 +290,37 @@
             }
 
             if (iconNum >= 0) {
-                float x = colWidth * col - ((128 - colWidth) / 2);
+                float x = colWidth * col + (colWidth / 2);
+                storeF(ALLOC_VP_CONSTANTS, 2, x);
 
-                if ((y >= ymin) && (y <= ymax)) {
-                    float iconY = y - 20;
-                    setColor(1.f, 1.f, 1.f, 1.f);
-                    if (state->selectedIconIndex == iconNum && !p) {
-                        bindTexture(NAMED_PFTexNearest, 0, state->selectedIconTexture);
-                        drawSpriteScreenspace(x, iconY, 0, 128, 128);
-                    }
-
-                    bindTexture(NAMED_PFTexNearest, 0, loadI32(ALLOC_ICON_IDS, iconNum));
-                    if (!p) {
-                        int cropT = 0;
-                        if (y > gridTop) {
-                            cropT = y - gridTop;
-                        }
-                        int cropB = 0;
-                        if (y < gridBottom) {
-                            cropB = gridBottom - y;
-                        }
-                        drawSpriteScreenspaceCropped(x, iconY+cropB, 0, 128, 128-cropT-cropB,
-                                0, 128-cropB, 128, -128+cropT+cropB);
-                    } else {
-                        float px = ((x + 64) - (getWidth() / 2)) / (getWidth() / 2);
-                        float py = ((iconY + 64) - (getHeight() / 2)) / (getWidth() / 2);
-                        float d = 64.f / (getWidth() / 2);
-                        px *= p + 1;
-                        py *= p + 1;
-                        drawQuadTexCoords(px - d, py - d, -p, 0, 1,
-                                          px - d, py + d, -p, 0, 0,
-                                          px + d, py + d, -p, 1, 0,
-                                          px + d, py - d, -p, 1, 1);
-                    }
+                if (state->selectedIconIndex == iconNum && !p) {
+                    bindProgramFragment(NAMED_PFTexNearest);
+                    bindTexture(NAMED_PFTexNearest, 0, state->selectedIconTexture);
+                    storeF(ALLOC_VP_CONSTANTS, 0, SELECTION_TEXTURE_WIDTH_PX);
+                    storeF(ALLOC_VP_CONSTANTS, 1, SELECTION_TEXTURE_HEIGHT_PX);
+                    storeF(ALLOC_VP_CONSTANTS, 3, y - (SELECTION_TEXTURE_HEIGHT_PX - ICON_TEXTURE_HEIGHT_PX) * 0.5f);
+                    drawSimpleMesh(NAMED_SMCell);
                 }
+
+                bindProgramFragment(NAMED_PFTexMip);
+                storeF(ALLOC_VP_CONSTANTS, 0, ICON_TEXTURE_WIDTH_PX);
+                storeF(ALLOC_VP_CONSTANTS, 1, ICON_TEXTURE_HEIGHT_PX);
+                storeF(ALLOC_VP_CONSTANTS, 3, y);
+                bindTexture(NAMED_PFTexMip, 0, loadI32(ALLOC_ICON_IDS, iconNum));
+                drawSimpleMesh(NAMED_SMCell);
+
+                bindProgramFragment(NAMED_PFTexMipAlpha);
+                storeF(ALLOC_VP_CONSTANTS, 0, 128.f);
+                storeF(ALLOC_VP_CONSTANTS, 1, 64.f);
+                storeF(ALLOC_VP_CONSTANTS, 3, y - 64.f);
+                bindTexture(NAMED_PFTexMipAlpha, 0, loadI32(ALLOC_LABEL_IDS, iconNum));
+                drawSimpleMesh(NAMED_SMCell);
             }
             iconNum++;
         }
     }
 }
 
-void drawStrip(float row, float column, int isTop, int iconNum, float p)
-{
-    if (iconNum < 0) return;
-    int offset = positionStrip(row, column, isTop, p, 0);
-    bindTexture(NAMED_PFTexMip, 0, loadI32(ALLOC_ICON_IDS, iconNum));
-    if (offset < -20) return;
-    offset = clamp(offset, 0, 199 - 20);
-
-    int len = 20;
-    if (isTop && (offset < 7)) {
-        len -= 7 - offset;
-        offset = 7;
-    }
-
-    drawSimpleMeshRange(NAMED_SMMesh, offset * 6, len * 6);
-    //drawSimpleMesh(NAMED_SMMesh);
-}
-
-void drawTop(float rowOffset, float p)
-{
-    int row, col;
-    int iconNum = 0;
-    for (row = 0; row <= (int)(rowOffset+1); row++) {
-        for (col=0; col < 4; col++) {
-            if (iconNum >= state->iconCount) {
-                return;
-            }
-            drawStrip(rowOffset - row, col, 1, iconNum, p);
-            iconNum++;
-        }
-    }
-}
-
-void drawBottom(float rowOffset, float p)
-{
-    float pos = -1.f;
-    int intRowOffset = rowOffset;
-    pos -= rowOffset - intRowOffset;
-
-    int row, col;
-    int iconNum = (intRowOffset + 3) * 4;
-    while (1) {
-        for (col=0; col < 4; col++) {
-            if (iconNum >= state->iconCount) {
-                return;
-            }
-            if (pos > -1) {
-                drawStrip(pos, col, 0, iconNum, p);
-            }
-            iconNum++;
-        }
-        pos += 1.f;
-    }
-}
 
 int
 main(int launchID)
@@ -484,31 +383,11 @@
     //debugF("    draw g_PosPage", g_PosPage);
 
     // Draw the icons ========================================
-
-    /*
-    bindProgramFragment(NAMED_PFColor);
-    positionStrip(1, 0, 1, 0, 0);
-    drawSimpleMesh(NAMED_SMMesh);
-    */
-
-    bindProgramFragment(NAMED_PFTexMip);
-
-    drawTop(g_PosPage, 1-g_Zoom);
-    drawBottom(g_PosPage, 1-g_Zoom);
-
-    bindProgramFragment(NAMED_PFTexMip);
-    {
-        float mat1[16];
-        matrixLoadIdentity(mat1);
-        vpLoadModelMatrix(mat1);
-        vpLoadTextureMatrix(mat1);
-    }
+    drawFrontGrid(g_PosPage, 1-g_Zoom);
 
     bindProgramFragment(NAMED_PFTexNearest);
-    drawFrontGrid(g_PosPage, 1-g_Zoom);
     draw_home_button();
 
-
     // This is a WAR to do a rendering pass without drawing during init to
     // force the driver to preload and compile its shaders.
     // Without this the first animation does not appear due to the time it
diff --git a/res/raw/rollo.c b/res/raw/rollo.c
deleted file mode 100644
index 6a41727..0000000
--- a/res/raw/rollo.c
+++ /dev/null
@@ -1,432 +0,0 @@
-#pragma version(1)
-#pragma stateVertex(PV)
-#pragma stateFragment(PFTexLinear)
-#pragma stateStore(PSIcons)
-
-#define PI 3.14159f
-
-
-// Attraction to center values from page edge to page center.
-float g_AttractionTable[9];
-float g_FrictionTable[9];
-float g_PhysicsTableSize;
-
-float g_PosPage;
-float g_PosVelocity;
-float g_LastPositionX;
-int g_LastTouchDown;
-float g_DT;
-int g_LastTime;
-int g_PageCount;
-float g_Zoom;
-
-// Drawing constants, should be parameters ======
-#define VIEW_ANGLE 1.28700222f
-
-float g_OldPosPage;
-float g_OldPosVelocity;
-float g_OldZoom;
-
-int g_DrawLastFrame;
-int lastFrame(int draw) {
-    // We draw one extra frame to work around the last frame post bug.
-    // We also need to track if we drew the last frame to deal with large DT
-    // in the physics.
-    int ret = g_DrawLastFrame | draw;
-    g_DrawLastFrame = draw;
-    return ret;  // should return draw instead.
-}
-
-void updateReadback() {
-    if ((g_OldPosPage != g_PosPage) ||
-        (g_OldPosVelocity != g_PosVelocity) ||
-        (g_OldZoom != g_Zoom)) {
-
-        g_OldPosPage = g_PosPage;
-        g_OldPosVelocity = g_PosVelocity;
-        g_OldZoom = g_Zoom;
-
-        int i[3];
-        i[0] = g_PosPage * (1 << 16);
-        i[1] = g_PosVelocity * (1 << 16);
-        i[2] = g_OldZoom * (1 << 16);
-        sendToClient(&i[0], 1, 12, 1);
-    }
-}
-
-void init() {
-    g_AttractionTable[0] = 6.5f;
-    g_AttractionTable[1] = 6.5f;
-    g_AttractionTable[2] = 7.0f;
-    g_AttractionTable[3] = 6.0f;
-    g_AttractionTable[4] = -6.0f;
-    g_AttractionTable[5] = -7.0f;
-    g_AttractionTable[6] = -6.5f;
-    g_AttractionTable[7] = -6.5f;
-    g_AttractionTable[8] = -6.5f;  // dup 7 to avoid a clamp later
-    g_FrictionTable[0] = 3.5f;
-    g_FrictionTable[1] = 3.6f;
-    g_FrictionTable[2] = 4.0f;
-    g_FrictionTable[3] = 5.0f;
-    g_FrictionTable[4] = 5.0f;
-    g_FrictionTable[5] = 4.0f;
-    g_FrictionTable[6] = 3.6f;
-    g_FrictionTable[7] = 3.5f;
-    g_FrictionTable[8] = 3.5f;  // dup 7 to avoid a clamp later
-    g_PhysicsTableSize = 7;
-
-    g_PosVelocity = 0;
-    g_PosPage = 0;
-    g_LastTouchDown = 0;
-    g_LastPositionX = 0;
-    g_Zoom = 0;
-}
-
-void resetHWWar() {
-}
-
-void move() {
-    if (g_LastTouchDown) {
-        float dx = -(state->newPositionX - g_LastPositionX);
-        g_PosVelocity = 0;
-        g_PosPage += dx;
-
-        float pmin = -0.25f;
-        float pmax = (g_PageCount - 1) + 0.25f;
-        g_PosPage = clampf(g_PosPage, pmin, pmax);
-    }
-    g_LastTouchDown = state->newTouchDown;
-    g_LastPositionX = state->newPositionX;
-    //debugF("Move P", g_PosPage);
-}
-
-void fling() {
-    g_LastTouchDown = 0;
-    g_PosVelocity = -state->flingVelocityX;
-    float av = fabsf(g_PosVelocity);
-    float minVel = 3.5f;
-
-    minVel *= 1.f - (fabsf(fracf(g_PosPage + 0.5f) - 0.5f) * 0.45f);
-
-    if (av < minVel && av > 0.2f) {
-        if (g_PosVelocity > 0) {
-            g_PosVelocity = minVel;
-        } else {
-            g_PosVelocity = -minVel;
-        }
-    }
-
-    if (g_PosPage <= 0) {
-        g_PosVelocity = maxf(0, g_PosVelocity);
-    }
-    if (g_PosPage > (g_PageCount - 1)) {
-        g_PosVelocity = minf(0, g_PosVelocity);
-    }
-    //debugF("fling v", g_PosVelocity);
-}
-
-void touchUp() {
-    g_LastTouchDown = 0;
-}
-
-int
-count_pages(int iconCount)
-{
-    int iconsPerPage = COLUMNS_PER_PAGE * ROWS_PER_PAGE;
-    int pages = iconCount / iconsPerPage;
-    if (pages*iconsPerPage != iconCount) {
-        pages++;
-    }
-    return pages;
-}
-
-float
-modf(float x, float y)
-{
-    return x-(y*floorf(x/y));
-}
-
-void updatePos() {
-    if (g_LastTouchDown) {
-        return;
-    }
-
-    float tablePosNorm = fracf(g_PosPage + 0.5f);
-    float tablePosF = tablePosNorm * g_PhysicsTableSize;
-    int tablePosI = tablePosF;
-    float tablePosFrac = tablePosF - tablePosI;
-    float accel = lerpf(g_AttractionTable[tablePosI],
-                        g_AttractionTable[tablePosI + 1],
-                        tablePosFrac) * g_DT;
-    float friction = lerpf(g_FrictionTable[tablePosI],
-                           g_FrictionTable[tablePosI + 1],
-                           tablePosFrac) * g_DT;
-    //debugF("  accel", accel);
-    //debugF("  friction", friction);
-
-    // If our velocity is low OR acceleration is opposing it, apply it.
-    if (fabsf(g_PosVelocity) < 1.0f || (g_PosVelocity * accel) < 0) {
-        g_PosVelocity += accel;
-    }
-
-    if ((friction > fabsf(g_PosVelocity)) && (friction > fabsf(accel))) {
-        // Special get back to center and overcome friction physics.
-        float t = tablePosNorm - 0.5f;
-        if (fabsf(t) < (friction * g_DT)) {
-            // really close, just snap
-            g_PosPage = roundf(g_PosPage);
-            g_PosVelocity = 0;
-        } else {
-            if (t > 0) {
-                g_PosVelocity = -friction;
-            } else {
-                g_PosVelocity = friction;
-            }
-        }
-    } else {
-        // Normal physics
-        if (g_PosVelocity > 0) {
-            g_PosVelocity -= friction;
-            g_PosVelocity = maxf(g_PosVelocity, 0);
-        } else {
-            g_PosVelocity += friction;
-            g_PosVelocity = minf(g_PosVelocity, 0);
-        }
-    }
-    g_PosPage += g_PosVelocity * g_DT;
-
-    // Check for out of boundry conditions.
-    if (g_PosPage < 0 && g_PosVelocity < 0) {
-        float damp = 1.0 + (g_PosPage * 4);
-        damp = clampf(damp, 0.f, 0.9f);
-        g_PosVelocity *= damp;
-    }
-    if (g_PosPage > (g_PageCount-1) && g_PosVelocity > 0) {
-        float damp = 1.0 - ((g_PosPage - g_PageCount + 1) * 4);
-        damp = clampf(damp, 0.f, 0.9f);
-        g_PosVelocity *= damp;
-    }
-}
-
-float
-far_size(float sizeAt0)
-{
-    return sizeAt0 * (RADIUS+2) / 2; // -2 is the camera z=(z-camZ)/z
-}
-
-void
-draw_page(int icon, int lastIcon, float centerAngle, float scale)
-{
-    int row;
-    int col;
-
-    //debugF("center angle", centerAngle);
-
-    float iconTextureWidth = ICON_WIDTH_PX / (float)ICON_TEXTURE_WIDTH_PX;
-    float iconTextureHeight = ICON_HEIGHT_PX / (float)ICON_TEXTURE_HEIGHT_PX;
-
-    float iconWidthAngle = VIEW_ANGLE * ICON_WIDTH_PX / SCREEN_WIDTH_PX;
-    float columnGutterAngle = iconWidthAngle * 0.9f;
-
-    float farIconSize = FAR_ICON_SIZE;
-    float iconGutterHeight = farIconSize * 1.3f;
-
-    float farIconTextureSize = far_size(2 * ICON_TEXTURE_WIDTH_PX / (float)SCREEN_WIDTH_PX);
-
-    float normalizedLabelWidth = 2 * params->bubbleWidth / (float)SCREEN_WIDTH_PX;
-    float farLabelHeight = far_size(params->bubbleHeight * (normalizedLabelWidth / params->bubbleWidth));
-
-    for (row=0; row<ROWS_PER_PAGE && icon<=lastIcon; row++) {
-        float angle = centerAngle;
-        angle -= (columnGutterAngle + iconWidthAngle) * 1.5f;
-
-        float iconTop = (farIconSize + iconGutterHeight) * (1.85f + ICON_TOP_OFFSET)
-                - row * (farIconSize + iconGutterHeight);
-        float iconBottom = iconTop - farIconSize;
-
-        float labelY = iconBottom - farLabelHeight;
-        float iconTextureTop = iconTop + (0.5f * (farIconTextureSize - farIconSize));
-        float iconTextureBottom = iconTextureTop - farIconTextureSize;
-
-        for (col=0; col<COLUMNS_PER_PAGE && icon<=lastIcon; col++) {
-            // icon
-            float sine = sinf(angle);
-            float cosine = cosf(angle);
-
-            float centerX = sine * RADIUS;
-            float centerZ = cosine * RADIUS / scale;
-
-            if (scale > 1.f) {
-                centerX *= scale;
-            }
-
-            float iconLeftX = centerX  - (/*cosine * */ farIconTextureSize * .5);
-            float iconRightX = centerX + (/*cosine * */ farIconTextureSize * .5);
-            float iconLeftZ = centerZ;// + (sine * farIconTextureSize * .5);
-            float iconRightZ = centerZ;// - (sine * farIconTextureSize * .5);
-
-            color(1.0f, 1.0f, 1.0f, 0.99f);
-            if (state->selectedIconIndex == icon) {
-                bindTexture(NAMED_PFTexLinear, 0, state->selectedIconTexture);
-                drawQuadTexCoords(
-                        iconLeftX, iconTextureTop, iconLeftZ,       0.0f, 0.0f,
-                        iconRightX, iconTextureTop, iconRightZ,     1.0f, 0.0f,
-                        iconRightX, iconTextureBottom, iconRightZ,  1.0f, 1.0f,
-                        iconLeftX, iconTextureBottom, iconLeftZ,    0.0f, 1.0f);
-            } else {
-                bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_ICON_IDS, icon));
-                drawQuadTexCoords(
-                        iconLeftX, iconTextureTop, iconLeftZ,       0.0f, 0.0f,
-                        iconRightX, iconTextureTop, iconRightZ,     1.0f, 0.0f,
-                        iconRightX, iconTextureBottom, iconRightZ,  1.0f, 1.0f,
-                        iconLeftX, iconTextureBottom, iconLeftZ,    0.0f, 1.0f);
-            }
-
-            // label
-            if (scale < 1.2f) {
-                float a = (1.2f - maxf(scale, 1.0f)) * 5;
-                color(1.0f, 1.0f, 1.0f, a);
-                bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_LABEL_IDS, icon));
-                drawSprite(centerX, labelY, centerZ,
-                           params->bubbleBitmapWidth, params->bubbleBitmapHeight);
-            }
-
-            angle += columnGutterAngle + iconWidthAngle;
-            icon++;
-        }
-    }
-}
-
-void
-draw_home_button()
-{
-    color(1.0f, 1.0f, 1.0f, 1.0f);
-    bindTexture(NAMED_PFTexLinear, 0, state->homeButtonId);
-
-    float scale = 2.0f / SCREEN_WIDTH_PX;
-
-    float x = 0.0f;
-
-    float y = -(SCREEN_HEIGHT_PX / (float)SCREEN_WIDTH_PX);
-    y += g_Zoom * (scale * params->homeButtonTextureHeight / 2);
-
-    float z = 0.0f;
-    drawSprite(x, y, z, params->homeButtonTextureWidth, params->homeButtonTextureHeight);
-}
-
-int
-main(int launchID)
-{
-    // Compute dt in seconds.
-    int newTime = uptimeMillis();
-    g_DT = (newTime - g_LastTime) / 1000.f;
-    g_LastTime = newTime;
-
-    if (!g_DrawLastFrame) {
-        // If we stopped rendering we cannot use DT.
-        // assume 30fps in this case.
-        g_DT = 0.033f;
-    }
-    if (g_DT > 0.2f) {
-        // physics may break if DT is large.
-        g_DT = 0.2f;
-    }
-
-    //debugF("zoom", g_Zoom);
-    if (g_Zoom != state->zoomTarget) {
-        float dz = (state->zoomTarget - g_Zoom) * g_DT * 5;
-        if (dz && (fabsf(dz) < 0.03f)) {
-            if (dz > 0) {
-                dz = 0.03f;
-            } else {
-                dz = -0.03f;
-            }
-        }
-        if (fabsf(g_Zoom - state->zoomTarget) < fabsf(dz)) {
-            g_Zoom = state->zoomTarget;
-        } else {
-            g_Zoom += dz;
-        }
-        updateReadback();
-    }
-
-    // Set clear value to dim the background based on the zoom position.
-    if ((g_Zoom < 0.001f) && (state->zoomTarget < 0.001f)) {
-        pfClearColor(0.0f, 0.0f, 0.0f, 0.0f);
-        // When we're zoomed out and not tracking motion events, reset the pos to 0.
-        if (!g_LastTouchDown) {
-            g_PosPage = 0;
-        }
-        return lastFrame(0);
-    } else if (g_Zoom < 0.85f) {
-        pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom);
-    } else {
-        pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom);
-    }
-
-    // icons & labels
-    int iconCount = state->iconCount;
-    g_PageCount = count_pages(iconCount);
-
-    updatePos(0.1f);
-    updateReadback();
-
-    //debugF("    draw g_PosPage", g_PosPage);
-
-    // Draw the icons ========================================
-
-    // Bug makes 1.0f alpha fail.
-    color(1.0f, 1.0f, 1.0f, 0.99f);
-
-    if (iconCount <= 0) {
-        return lastFrame(0);
-    }
-    int lastIcon = iconCount-1;
-
-    int page = g_PosPage;
-    float currentPagePosition = g_PosPage - page;
-
-    int iconsPerPage = COLUMNS_PER_PAGE * ROWS_PER_PAGE;
-    int icon = clamp(iconsPerPage * page, 0, lastIcon);
-
-    float scale = (1 / g_Zoom);
-
-    float pageAngle = VIEW_ANGLE * 1.2f;
-    draw_page(icon, lastIcon, -pageAngle*currentPagePosition, scale);
-    draw_page(icon+iconsPerPage, lastIcon, (-pageAngle*currentPagePosition)+pageAngle, scale);
-
-    // Draw the border lines for debugging ========================================
-    /*
-    bindProgramVertex(NAMED_PVOrtho);
-    bindProgramFragment(NAMED_PFOrtho);
-    bindProgramFragmentStore(NAMED_PFSText);
-
-    color(1.0f, 1.0f, 0.0f, 0.99f);
-    int i;
-    for (i=0; i<ROWS_PER_PAGE+1; i++) {
-        int y = loadI32(ALLOC_Y_BORDERS, i);
-        drawRect(0, y, SCREEN_WIDTH_PX, y+1, 0.0f);
-    }
-    for (i=0; i<COLUMNS_PER_PAGE+1; i++) {
-        int x = loadI32(ALLOC_X_BORDERS, i);
-        drawRect(x, 0, x+1, SCREEN_HEIGHT_PX, 0.0f);
-    }
-    */
-
-    // Draw the home button ========================================
-    draw_home_button();
-
-    /*
-    bindTexture(NAMED_PFOrtho, 0, loadI32(ALLOC_PARAMS, PARAM_SCROLL_HANDLE_ID));
-    float handleLeft = 40 + (320 * (scrollXPx/(float)(maxScrollXPx)));
-    float handleTop = 680;
-    float handleWidth = loadI32(ALLOC_PARAMS, PARAM_SCROLL_HANDLE_TEX_WIDTH);
-    float handleHeight = loadI32(ALLOC_PARAMS, PARAM_SCROLL_HANDLE_TEX_HEIGHT);
-    drawRect(handleLeft, handleTop, handleLeft+handleWidth, handleTop+handleHeight, 0.0f);
-    */
-
-    // Bug workaround where the last frame is not always displayed
-    // So we keep rendering until the bug is fixed.
-    return lastFrame((g_PosVelocity != 0) || fracf(g_PosPage) || (g_Zoom != state->zoomTarget));
-}
-
diff --git a/res/raw/rollo2.c b/res/raw/rollo2.c
deleted file mode 100644
index eb87063..0000000
--- a/res/raw/rollo2.c
+++ /dev/null
@@ -1,404 +0,0 @@
-#pragma version(1)
-#pragma stateVertex(PV)
-#pragma stateFragment(PFTexLinear)
-#pragma stateStore(PSIcons)
-
-#define PI 3.14159f
-
-
-// Attraction to center values from page edge to page center.
-float g_AttractionTable[9];
-float g_FrictionTable[9];
-float g_PhysicsTableSize;
-
-float g_PosPage;
-float g_PosVelocity;
-float g_LastPositionX;
-int g_LastTouchDown;
-float g_DT;
-int g_LastTime;
-int g_PageCount;
-float g_Zoom;
-float g_OldPosPage;
-float g_OldPosVelocity;
-float g_OldZoom;
-
-// Drawing constants, should be parameters ======
-#define VIEW_ANGLE 1.28700222f
-
-int g_DrawLastFrame;
-int lastFrame(int draw) {
-    // We draw one extra frame to work around the last frame post bug.
-    // We also need to track if we drew the last frame to deal with large DT
-    // in the physics.
-    int ret = g_DrawLastFrame | draw;
-    g_DrawLastFrame = draw;
-    return ret;  // should return draw instead.
-}
-
-void updateReadback() {
-    if ((g_OldPosPage != g_PosPage) ||
-        (g_OldPosVelocity != g_PosVelocity) ||
-        (g_OldZoom != g_Zoom)) {
-
-        g_OldPosPage = g_PosPage;
-        g_OldPosVelocity = g_PosVelocity;
-        g_OldZoom = g_Zoom;
-
-        int i[3];
-        i[0] = g_PosPage * (1 << 16);
-        i[1] = g_PosVelocity * (1 << 16);
-        i[2] = g_OldZoom * (1 << 16);
-        sendToClient(&i[0], 1, 12, 1);
-    }
-}
-
-void init() {
-    g_AttractionTable[0] = 6.5f;
-    g_AttractionTable[1] = 6.5f;
-    g_AttractionTable[2] = 7.0f;
-    g_AttractionTable[3] = 6.0f;
-    g_AttractionTable[4] = -6.0f;
-    g_AttractionTable[5] = -7.0f;
-    g_AttractionTable[6] = -6.5f;
-    g_AttractionTable[7] = -6.5f;
-    g_AttractionTable[8] = -6.5f;  // dup 7 to avoid a clamp later
-    g_FrictionTable[0] = 3.5f;
-    g_FrictionTable[1] = 3.6f;
-    g_FrictionTable[2] = 4.0f;
-    g_FrictionTable[3] = 5.0f;
-    g_FrictionTable[4] = 5.0f;
-    g_FrictionTable[5] = 4.0f;
-    g_FrictionTable[6] = 3.6f;
-    g_FrictionTable[7] = 3.5f;
-    g_FrictionTable[8] = 3.5f;  // dup 7 to avoid a clamp later
-    g_PhysicsTableSize = 7;
-
-    g_PosVelocity = 0;
-    g_PosPage = 0;
-    g_LastTouchDown = 0;
-    g_LastPositionX = 0;
-    g_Zoom = 0;
-}
-
-void resetHWWar() {
-}
-
-void move() {
-    if (g_LastTouchDown) {
-        float dx = -(state->newPositionX - g_LastPositionX);
-        g_PosVelocity = 0;
-        g_PosPage += dx;
-
-        float pmin = -0.25f;
-        float pmax = (g_PageCount - 1) + 0.25f;
-        g_PosPage = clampf(g_PosPage, pmin, pmax);
-    }
-    g_LastTouchDown = state->newTouchDown;
-    g_LastPositionX = state->newPositionX;
-    //debugF("Move P", g_PosPage);
-}
-
-void fling() {
-    g_LastTouchDown = 0;
-    g_PosVelocity = -state->flingVelocityX;
-    float av = fabsf(g_PosVelocity);
-    float minVel = 3.5f;
-
-    minVel *= 1.f - (fabsf(fracf(g_PosPage + 0.5f) - 0.5f) * 0.45f);
-
-    if (av < minVel && av > 0.2f) {
-        if (g_PosVelocity > 0) {
-            g_PosVelocity = minVel;
-        } else {
-            g_PosVelocity = -minVel;
-        }
-    }
-
-    if (g_PosPage <= 0) {
-        g_PosVelocity = maxf(0, g_PosVelocity);
-    }
-    if (g_PosPage > (g_PageCount - 1)) {
-        g_PosVelocity = minf(0, g_PosVelocity);
-    }
-    //debugF("fling v", g_PosVelocity);
-}
-
-void touchUp() {
-    g_LastTouchDown = 0;
-}
-
-int
-count_pages(int iconCount)
-{
-    int iconsPerPage = COLUMNS_PER_PAGE * ROWS_PER_PAGE;
-    int pages = iconCount / iconsPerPage;
-    if (pages*iconsPerPage != iconCount) {
-        pages++;
-    }
-    return pages;
-}
-
-float
-modf(float x, float y)
-{
-    return x-(y*floorf(x/y));
-}
-
-void updatePos() {
-    if (g_LastTouchDown) {
-        return;
-    }
-
-    float tablePosNorm = fracf(g_PosPage + 0.5f);
-    float tablePosF = tablePosNorm * g_PhysicsTableSize;
-    int tablePosI = tablePosF;
-    float tablePosFrac = tablePosF - tablePosI;
-    float accel = lerpf(g_AttractionTable[tablePosI],
-                        g_AttractionTable[tablePosI + 1],
-                        tablePosFrac) * g_DT;
-    float friction = lerpf(g_FrictionTable[tablePosI],
-                           g_FrictionTable[tablePosI + 1],
-                           tablePosFrac) * g_DT;
-    //debugF("  accel", accel);
-    //debugF("  friction", friction);
-
-    // If our velocity is low OR acceleration is opposing it, apply it.
-    if (fabsf(g_PosVelocity) < 1.0f || (g_PosVelocity * accel) < 0) {
-        g_PosVelocity += accel;
-    }
-
-    if ((friction > fabsf(g_PosVelocity)) && (friction > fabsf(accel))) {
-        // Special get back to center and overcome friction physics.
-        float t = tablePosNorm - 0.5f;
-        if (fabsf(t) < (friction * g_DT)) {
-            // really close, just snap
-            g_PosPage = roundf(g_PosPage);
-            g_PosVelocity = 0;
-        } else {
-            if (t > 0) {
-                g_PosVelocity = -friction;
-            } else {
-                g_PosVelocity = friction;
-            }
-        }
-    } else {
-        // Normal physics
-        if (g_PosVelocity > 0) {
-            g_PosVelocity -= friction;
-            g_PosVelocity = maxf(g_PosVelocity, 0);
-        } else {
-            g_PosVelocity += friction;
-            g_PosVelocity = minf(g_PosVelocity, 0);
-        }
-    }
-    g_PosPage += g_PosVelocity * g_DT;
-
-    // Check for out of boundry conditions.
-    if (g_PosPage < 0 && g_PosVelocity < 0) {
-        float damp = 1.0 + (g_PosPage * 4);
-        damp = clampf(damp, 0.f, 0.9f);
-        g_PosVelocity *= damp;
-    }
-    if (g_PosPage > (g_PageCount-1) && g_PosVelocity > 0) {
-        float damp = 1.0 - ((g_PosPage - g_PageCount + 1) * 4);
-        damp = clampf(damp, 0.f, 0.9f);
-        g_PosVelocity *= damp;
-    }
-}
-
-int positionStrip(float row, float column)
-{
-    float mat1[16];
-
-    float y =  1.2f - row * 0.6f;
-
-    float scale = 256.f / getWidth();
-    float xscale = scale * 4.55 / 1.8f / 2;
-
-    matrixLoadTranslate(mat1, 0.f, y, 0.f);
-    matrixScale(mat1, 1.f, scale, 1.f);
-    vpLoadModelMatrix(mat1);
-
-    float soff = -21.8f - (column * 1.25f);
-    matrixLoadScale(mat1, xscale, 1.f, 1.f);
-    matrixTranslate(mat1, soff, 0, 0);
-    vpLoadTextureMatrix(mat1);
-
-    return - soff * 10.f;
-}
-
-void drawIcon(float row, float column, int iconNum)
-{
-    int offset = positionStrip(row, column);
-    bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_ICON_IDS, iconNum));
-
-    if (offset < 0) {
-        offset = 0;
-    }
-    if (offset >= (450 - 20)) {
-        offset = (449 - 20);
-    }
-    drawSimpleMeshRange(NAMED_SMMesh, offset * 6, 20 * 6);
-}
-
-void
-draw_home_button()
-{
-    color(1.0f, 1.0f, 1.0f, 1.0f);
-    bindTexture(NAMED_PFTexLinear, 0, state->homeButtonId);
-
-    float scale = 2.0f / SCREEN_WIDTH_PX;
-
-    float x = 0.0f;
-
-    float y = -(SCREEN_HEIGHT_PX / (float)SCREEN_WIDTH_PX);
-    y += g_Zoom * (scale * params->homeButtonTextureHeight / 2);
-
-    float z = 0.0f;
-    drawSprite(x, y, z, params->homeButtonTextureWidth, params->homeButtonTextureHeight);
-}
-
-int
-main(int launchID)
-{
-    // Compute dt in seconds.
-    int newTime = uptimeMillis();
-    g_DT = (newTime - g_LastTime) / 1000.f;
-    g_LastTime = newTime;
-
-    if (!g_DrawLastFrame) {
-        // If we stopped rendering we cannot use DT.
-        // assume 30fps in this case.
-        g_DT = 0.033f;
-    }
-    if (g_DT > 0.2f) {
-        // physics may break if DT is large.
-        g_DT = 0.2f;
-    }
-
-    debugF("zoom", g_Zoom);
-    if (g_Zoom != state->zoomTarget) {
-        float dz = (state->zoomTarget - g_Zoom) * g_DT * 5;
-        if (dz && (fabsf(dz) < 0.03f)) {
-            if (dz > 0) {
-                dz = 0.03f;
-            } else {
-                dz = -0.03f;
-            }
-        }
-        if (fabsf(g_Zoom - state->zoomTarget) < fabsf(dz)) {
-            g_Zoom = state->zoomTarget;
-        } else {
-            g_Zoom += dz;
-        }
-        updateReadback();
-    }
-
-    // Set clear value to dim the background based on the zoom position.
-    if ((g_Zoom < 0.001f) && (state->zoomTarget < 0.001f)) {
-        pfClearColor(0.0f, 0.0f, 0.0f, 0.0f);
-        // When we're zoomed out and not tracking motion events, reset the pos to 0.
-        if (!g_LastTouchDown) {
-            g_PosPage = 0;
-        }
-        return lastFrame(0);
-    } else if (g_Zoom < 0.85f) {
-        pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom);
-    } else {
-        pfClearColor(0.0f, 0.0f, 0.0f, g_Zoom);
-    }
-
-    // icons & labels
-    int iconCount = state->iconCount;
-    g_PageCount = count_pages(iconCount);
-
-    updatePos(0.1f);
-    updateReadback();
-
-    debugF("    draw g_PosPage", g_PosPage);
-
-    // Draw the icons ========================================
-
-    // Bug makes 1.0f alpha fail.
-    //color(0.2f, 0.2f, 0.2f, 0.99f);
-    //bindProgramFragment(NAMED_PFColor);
-    //positionStrip(0, 0);
-    //drawSimpleMesh(NAMED_SMMesh);
-
-    bindProgramFragment(NAMED_PFTexLinear);
-
-
-    int lastIcon = iconCount-1;
-
-    int page = g_PosPage;
-    float currentPagePosition = g_PosPage - page;
-
-    int iconsPerPage = COLUMNS_PER_PAGE * ROWS_PER_PAGE;
-    float scale = (1 / g_Zoom);
-
-    float pageAngle = VIEW_ANGLE * 1.2f;
-
-    float zoomOffset = 40 * (1 - g_Zoom);
-    int drawPage;
-    //lastIcon = 1;
-    for (drawPage = 0; drawPage < g_PageCount; drawPage++) {
-        int r, c;
-        for (r=0; r < 4; r++) {
-            for (c=0; c < 4; c++) {
-                int iconNum = drawPage * 16 + c + r * 4;
-                if (iconNum <= lastIcon) {
-                    float p = (((float)drawPage) - g_PosPage) * 5.f;
-                    p += c - 1.5f;
-                    p += zoomOffset;
-                    if (fabsf(p) > 2) {
-                        drawIcon(r, p, iconNum);
-                    }
-                }
-            }
-        }
-    }
-
-    for (drawPage = 0; drawPage < g_PageCount; drawPage++) {
-        int r, c;
-        for (r=0; r < 4; r++) {
-            for (c=0; c < 4; c++) {
-                int iconNum = drawPage * 16 + c + r * 4;
-                if (iconNum <= lastIcon) {
-                    float p = (((float)drawPage) - g_PosPage) * 5.f;
-                    p += c - 1.5f;
-                    p += zoomOffset;
-                    float x = (p * 1.13f + 1.88f) * getWidth() * 0.2f;
-                    float y = 570 - r * 147;
-
-                    if (fabsf(p) <= 2) {
-                        drawIcon(r, p, iconNum);
-                    }
-                    if (fabsf(p) <= 2.5) {
-                        float a = (1.2f - maxf(scale, 1.0f)) * 5;
-                        color(1.0f, 1.0f, 1.0f, a);
-                        bindTexture(NAMED_PFTexLinear, 0, loadI32(ALLOC_LABEL_IDS, iconNum));
-                        drawSpriteScreenspace(x, y, 0,
-                                   params->bubbleBitmapWidth, params->bubbleBitmapHeight);
-                    }
-                }
-            }
-        }
-
-    }
-
-    {
-        float mat1[16];
-        matrixLoadIdentity(mat1);
-        vpLoadModelMatrix(mat1);
-        vpLoadTextureMatrix(mat1);
-    }
-
-    // Draw the home button ========================================
-    //draw_home_button();
-
-    // Bug workaround where the last frame is not always displayed
-    // So we keep rendering until the bug is fixed.
-    return 1; //(g_PosVelocity != 0) || fracf(g_PosPage) || g_Zoom != g_ZoomTarget);
-}
-
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 815bd10..d91aed2 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Přidat na plochu"</string>
     <string name="group_applications" msgid="4118484163419674240">"Aplikace"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Zástupce"</string>
-    <string name="group_search" msgid="5905328940867162196">"Hledat"</string>
     <string name="group_folder" msgid="5143593791798929193">"Nová složka"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Složky"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widgety"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Složka"</string>
     <string name="add_clock" msgid="2337943840175865746">"Hodiny"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Rámeček fotografie"</string>
-    <string name="add_search" msgid="7104834713685095105">"Vyhledávání"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Na této ploše již není místo."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Zástupce <xliff:g id="NAME">%s</xliff:g> byl vytvořen."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Zástupce <xliff:g id="NAME">%s</xliff:g> byl odebrán."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Povoluje aplikaci číst nastavení a odkazy plochy."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"zápis nastavení a odkazů plochy"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Povoluje aplikaci změnit nastavení a odkazy plochy."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Vyhledávání Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Problém s načtením widgetu"</string>
 </resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 391ec16..d38bd8d 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Føj til Startskærm"</string>
     <string name="group_applications" msgid="4118484163419674240">"Programmer"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Genveje"</string>
-    <string name="group_search" msgid="5905328940867162196">"Søg"</string>
     <string name="group_folder" msgid="5143593791798929193">"Ny mappe"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Mapper"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widgets"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Mappe"</string>
     <string name="add_clock" msgid="2337943840175865746">"Ur"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Billedramme"</string>
-    <string name="add_search" msgid="7104834713685095105">"Søg"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Der er ikke mere plads på Startskærmen."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Genvejen \"<xliff:g id="NAME">%s</xliff:g>\" blev oprettet."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Genvejen \"<xliff:g id="NAME">%s</xliff:g>\" blev fjernet."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Tillader, at et program læser indstillingerne og genvejene i Start."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"skriv indstillinger og genveje for Start"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Tillader, at et program ændrer indstillingerne og genvejene i Start."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Google-søgning"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Der er problemer med indlæsning af widget"</string>
 </resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 522bd4d..1c846b8 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Zum Startbildschirm hinzufügen"</string>
     <string name="group_applications" msgid="4118484163419674240">"Anwendungen"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Verknüpfungen"</string>
-    <string name="group_search" msgid="5905328940867162196">"Suchen"</string>
     <string name="group_folder" msgid="5143593791798929193">"Neuer Ordner"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Ordner"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widgets"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Ordner"</string>
     <string name="add_clock" msgid="2337943840175865746">"Uhr"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Bildrahmen"</string>
-    <string name="add_search" msgid="7104834713685095105">"Suchen"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Auf dem Startbildschirm ist kein Platz mehr vorhanden."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"\"<xliff:g id="NAME">%s</xliff:g>\"-Verknüpfung wurde erstellt."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"\"<xliff:g id="NAME">%s</xliff:g>\"-Verknüpfung wurde entfernt."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Ermöglicht einer Anwendung, die Einstellungen und Shortcuts auf der Startseite zu lesen."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"Einstellungen und Shortcuts für Startseite schreiben"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Ermöglicht einer Anwendung, die Einstellungen und Shortcuts auf der Startseite zu ändern."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Google-Suche"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Problem beim Laden des Widgets"</string>
 </resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index bb65bf3..1876e8b 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Προσθήκη στην αρχική οθόνη"</string>
     <string name="group_applications" msgid="4118484163419674240">"Εφαρμογές"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Συντομεύσεις"</string>
-    <string name="group_search" msgid="5905328940867162196">"Αναζήτηση"</string>
     <string name="group_folder" msgid="5143593791798929193">"Νέος φάκελος"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Φάκελοι"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Γραφικά στοιχεία"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Φάκελος"</string>
     <string name="add_clock" msgid="2337943840175865746">"Ρολόι"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Πλαίσιο εικόνας"</string>
-    <string name="add_search" msgid="7104834713685095105">"Αναζήτηση"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Δεν υπάρχει χώρος σε αυτήν την αρχική οθόνη."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Δημιουργήθηκε η συντόμευση \"<xliff:g id="NAME">%s</xliff:g>\"."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Η συντόμευση \"<xliff:g id="NAME">%s</xliff:g>\" καταργήθηκε."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Επιτρέπει σε μια εφαρμογή την ανάγνωση των ρυθμίσεων και των συντομεύσεων στην αρχική οθόνη."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"εγγραφή ρυθμίσεων και συντομεύσεων αρχικής οθόνης"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Επιτρέπει σε μια εφαρμογή την αλλαγή των ρυθμίσεων και των συντομεύσεων στην αρχική οθόνη."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Αναζήτηση Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Παρουσιάστηκε πρόβλημα στη φόρτωση του γραφικού στοιχείου"</string>
 </resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index bee06e3..1aa02fa 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Agregar a la pantalla Página principal"</string>
     <string name="group_applications" msgid="4118484163419674240">"Aplicaciones"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Accesos directos"</string>
-    <string name="group_search" msgid="5905328940867162196">"Buscar"</string>
     <string name="group_folder" msgid="5143593791798929193">"Carpeta nueva"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Carpetas"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Controles"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Carpeta"</string>
     <string name="add_clock" msgid="2337943840175865746">"Reloj"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Marco de imagen"</string>
-    <string name="add_search" msgid="7104834713685095105">"Buscar"</string>
     <string name="out_of_space" msgid="8365249326091984698">"No hay más espacio en esta pantalla de la página principal"</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Acceso directo \"<xliff:g id="NAME">%s</xliff:g>\" creado."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"El acceso directo \"<xliff:g id="NAME">%s</xliff:g>\" ha sido eliminado."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Permite a una aplicación leer la configuración y los accesos directos de la página principal."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"escribir configuración y accesos directos de la página principal"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Permite a una aplicación cambiar la configuración y los accesos directos de la página principal."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Búsqueda de Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Problema al cargar el widget"</string>
 </resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 7554c1b..1d3e3dd 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Añadir a pantalla de página principal"</string>
     <string name="group_applications" msgid="4118484163419674240">"Aplicaciones"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Accesos directos"</string>
-    <string name="group_search" msgid="5905328940867162196">"Búsqueda"</string>
     <string name="group_folder" msgid="5143593791798929193">"Nueva carpeta"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Carpetas"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widgets"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Carpeta"</string>
     <string name="add_clock" msgid="2337943840175865746">"Reloj"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Picture frame"</string>
-    <string name="add_search" msgid="7104834713685095105">"Búsqueda de Google"</string>
     <string name="out_of_space" msgid="8365249326091984698">"No queda espacio en esta pantalla de página principal."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Se ha creado el acceso directo \"<xliff:g id="NAME">%s</xliff:g>\"."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Se ha eliminado el acceso directo \"<xliff:g id="NAME">%s</xliff:g>\"."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Permite que una aplicación lea la información de configuración y accesos directos de la página principal."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"escribir información de accesos directos y de configuración de la página principal"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Permite que una aplicación modifique la configuración y los accesos directos de la página principal."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Búsqueda de Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Problema al cargar el widget"</string>
 </resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 0d66612..2b19e26 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Ajouter à l\'écran d\'accueil"</string>
     <string name="group_applications" msgid="4118484163419674240">"Applications"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Raccourcis"</string>
-    <string name="group_search" msgid="5905328940867162196">"Recherche"</string>
     <string name="group_folder" msgid="5143593791798929193">"Nouveau dossier"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Dossiers"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widgets"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Dossier"</string>
     <string name="add_clock" msgid="2337943840175865746">"Horloge"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Cadre d\'image"</string>
-    <string name="add_search" msgid="7104834713685095105">"Recherche"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Plus d\'espace libre sur l\'écran d\'accueil."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Le raccourci \"<xliff:g id="NAME">%s</xliff:g>\" a été créé."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Le raccourci \"<xliff:g id="NAME">%s</xliff:g>\" a été supprimé."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Permet à une application de lire les paramètres et raccourcis de la page d\'accueil."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"Enregistrer les paramètres de la page d\'accueil et des raccourcis"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Permet à une application de modifier les paramètres et les raccourcis de la page d\'accueil."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Recherche Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Problème lors du chargement du widget"</string>
 </resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 422f998..4bdd19d 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Aggiungi a schermata Home"</string>
     <string name="group_applications" msgid="4118484163419674240">"Applicazioni"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Collegamenti"</string>
-    <string name="group_search" msgid="5905328940867162196">"Ricerca"</string>
     <string name="group_folder" msgid="5143593791798929193">"Nuova cartella"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Cartelle"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widget"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Cartella"</string>
     <string name="add_clock" msgid="2337943840175865746">"Orologio"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Cornice immagini"</string>
-    <string name="add_search" msgid="7104834713685095105">"Ricerca"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Spazio nella schermata Home esaurito."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Collegamento \"<xliff:g id="NAME">%s</xliff:g>\" creato."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Il collegamento \"<xliff:g id="NAME">%s</xliff:g>\" è stato rimosso."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Consente a un\'applicazione di leggere le impostazioni e le scorciatoie in Home."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"creare impostazioni e scorciatoie in Home"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Consente a un\'applicazione di modificare le impostazioni e le scorciatoie in Home."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Ricerca Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Errore durante il caricamento del widget"</string>
 </resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 2d8cc6b..5db6f9b 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"ホーム画面に追加"</string>
     <string name="group_applications" msgid="4118484163419674240">"アプリケーション"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"ショートカット"</string>
-    <string name="group_search" msgid="5905328940867162196">"検索"</string>
     <string name="group_folder" msgid="5143593791798929193">"新しいフォルダ"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"フォルダ"</string>
     <string name="group_widgets" msgid="6704978494073105844">"ウィジェット"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"フォルダ"</string>
     <string name="add_clock" msgid="2337943840175865746">"時計"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"写真フレーム"</string>
-    <string name="add_search" msgid="7104834713685095105">"検索"</string>
     <string name="out_of_space" msgid="8365249326091984698">"ホーム画面に空きスペースがありません。"</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"ショートカット「<xliff:g id="NAME">%s</xliff:g>」を作成しました。"</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"ショートカット「<xliff:g id="NAME">%s</xliff:g>」を削除しました。"</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"ホームの設定とショートカットの読み取りをアプリケーションに許可します。"</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"ホームの設定とショートカットの書き込み"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"ホームの設定とショートカットの変更をアプリケーションに許可します。"</string>
-    <string name="search_hint" msgid="6974176141372467453">"Google検索"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"ウィジェットを表示できません"</string>
 </resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 91718b1..f0d917e 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"홈 화면에 추가"</string>
     <string name="group_applications" msgid="4118484163419674240">"응용프로그램"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"바로가기"</string>
-    <string name="group_search" msgid="5905328940867162196">"검색"</string>
     <string name="group_folder" msgid="5143593791798929193">"새 폴더"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"폴더"</string>
     <string name="group_widgets" msgid="6704978494073105844">"위젯"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"폴더"</string>
     <string name="add_clock" msgid="2337943840175865746">"시계"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"사진 프레임"</string>
-    <string name="add_search" msgid="7104834713685095105">"검색"</string>
     <string name="out_of_space" msgid="8365249326091984698">"홈 화면에 더 이상 공간이 없습니다."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"바로가기(\'<xliff:g id="NAME">%s</xliff:g>\')가 생성되었습니다."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"바로가기(\'<xliff:g id="NAME">%s</xliff:g>\')가 삭제되었습니다."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"응용프로그램이 홈에 있는 설정 및 바로가기를 읽을 수 있도록 합니다."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"홈 설정 및 바로가기 쓰기"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"응용프로그램이 홈에 있는 설정 및 바로가기를 변경할 수 있도록 합니다."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Google 검색"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"위젯을 로드하는 중 문제가 발생했습니다."</string>
 </resources>
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
index d2d31c2..d1236f2 100644
--- a/res/values-land/dimens.xml
+++ b/res/values-land/dimens.xml
@@ -17,7 +17,6 @@
 <resources>
     <dimen name="workspace_cell_width">106dip</dimen>
     <dimen name="workspace_cell_height">74dip</dimen>
-    <dimen name="search_widget_inset">19dip</dimen>
     <dimen name="gesture_thumbnail_inset">8dip</dimen>
     <dimen name="gesture_thumbnail_size">64dip</dimen>
 </resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 2208898..4ba9b73 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Legg til skrivebord"</string>
     <string name="group_applications" msgid="4118484163419674240">"Applikasjoner"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Snarveier"</string>
-    <string name="group_search" msgid="5905328940867162196">"Søk"</string>
     <string name="group_folder" msgid="5143593791798929193">"Ny mappe"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Mapper"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Skrivebordselementer"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Mappe"</string>
     <string name="add_clock" msgid="2337943840175865746">"Klokke"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Bilderamme"</string>
-    <string name="add_search" msgid="7104834713685095105">"Søk"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Ikke nok plass på skrivebordet."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Opprettet snarveien «<xliff:g id="NAME">%s</xliff:g>»."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Fjernet snarveien «<xliff:g id="NAME">%s</xliff:g>»."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Lar applikasjonen lese innstillinger og snarveier fra skrivebordet."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"skrive skrivebordsinnstillinger og -snarveier"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Lar applikasjonen endre innstillinger og snarveier på skrivebordet."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Google-søk"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Problem under lasting av gadget"</string>
 </resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 3a69066..73964c5 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Toevoegen aan startpagina"</string>
     <string name="group_applications" msgid="4118484163419674240">"Toepassingen"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Sneltoetsen"</string>
-    <string name="group_search" msgid="5905328940867162196">"Zoeken"</string>
     <string name="group_folder" msgid="5143593791798929193">"Nieuwe map"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Mappen"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widgets"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Map"</string>
     <string name="add_clock" msgid="2337943840175865746">"Klok"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Fotolijstje"</string>
-    <string name="add_search" msgid="7104834713685095105">"Zoeken"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Er is geen ruimte meer op dit startscherm."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Snelkoppeling \'<xliff:g id="NAME">%s</xliff:g>\' is gemaakt."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Snelkoppeling \'<xliff:g id="NAME">%s</xliff:g>\' is verwijderd."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Hiermee kan een toepassing de instellingen en snelkoppelingen op de startpagina lezen."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"instellingen en snelkoppelingen voor de startpagina schrijven"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Hiermee kan een toepassing de instellingen en snelkoppelingen op de startpagina wijzigen."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Google Zoeken"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Probleem bij het laden van widget"</string>
 </resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index cc9306b..74bed2a 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Dodaj do strony głównej"</string>
     <string name="group_applications" msgid="4118484163419674240">"Aplikacje"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Skróty"</string>
-    <string name="group_search" msgid="5905328940867162196">"Wyszukiwarka"</string>
     <string name="group_folder" msgid="5143593791798929193">"Nowy folder"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Foldery"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widżety"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Folder"</string>
     <string name="add_clock" msgid="2337943840175865746">"Zegar"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Ramka obrazu"</string>
-    <string name="add_search" msgid="7104834713685095105">"Wyszukiwarka"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Brak miejsca na tej stronie głównej"</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Skrót „<xliff:g id="NAME">%s</xliff:g>” został utworzony."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Skrót „<xliff:g id="NAME">%s</xliff:g>” został usunięty."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Umożliwia aplikacji odczytywanie ustawień i skrótów strony głównej."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"zapisywanie ustawień i skrótów strony głównej"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Umożliwia aplikacji zmianę ustawień i skrótów strony głównej."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Szukaj w Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Problem podczas ładowania widżetu"</string>
 </resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 895e945..0998818 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -31,7 +31,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Adicionar ao ecrã principal"</string>
     <string name="group_applications" msgid="4118484163419674240">"Aplicações"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Atalhos"</string>
-    <string name="group_search" msgid="5905328940867162196">"Pesquisar"</string>
     <string name="group_folder" msgid="5143593791798929193">"Nova pasta"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Pastas"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widgets"</string>
@@ -39,7 +38,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Pasta"</string>
     <string name="add_clock" msgid="2337943840175865746">"Relógio"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Moldura de imagem"</string>
-    <string name="add_search" msgid="7104834713685095105">"Pesquisar"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Não existe espaço suficiente neste ecrã principal."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"O atalho \"<xliff:g id="NAME">%s</xliff:g>\" foi criado."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"O atalho \"<xliff:g id="NAME">%s</xliff:g>\" foi removido."</string>
@@ -62,6 +60,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Permite que uma aplicação leia as definições e os atalhos do ecrã principal."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"escrever definições e atalhos do ecrã principal"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Permite que uma aplicação altere as definições e os atalhos do ecrã principal."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Pesquisa do Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Erro ao carregar o widget"</string>
 </resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 003927d..08686c1 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -31,7 +31,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Adicionar à tela da Página inicial"</string>
     <string name="group_applications" msgid="4118484163419674240">"Aplicativos"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Atalhos"</string>
-    <string name="group_search" msgid="5905328940867162196">"Pesquisar"</string>
     <string name="group_folder" msgid="5143593791798929193">"Nova pasta"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Pastas"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widgets"</string>
@@ -39,7 +38,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Pasta"</string>
     <string name="add_clock" msgid="2337943840175865746">"Relógio"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Frame da imagem"</string>
-    <string name="add_search" msgid="7104834713685095105">"Pesquisar"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Não há mais espaço nesta tela da Página inicial."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Atalho \"<xliff:g id="NAME">%s</xliff:g>\" criado."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"O atalho \"<xliff:g id="NAME">%s</xliff:g>\" foi removido."</string>
@@ -62,6 +60,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Permite que um aplicativo leia as configurações e atalhos na Página inicial."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"gravar configurações e atalhos da Página inicial"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Permite que um aplicativo altere as configurações e atalhos na Página inicial."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Pesquisa do Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Problema ao carregar o widget"</string>
 </resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 7542fdb..5ce7a7b 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Добавить на главный экран"</string>
     <string name="group_applications" msgid="4118484163419674240">"Приложения"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Ярлыки"</string>
-    <string name="group_search" msgid="5905328940867162196">"Поиск"</string>
     <string name="group_folder" msgid="5143593791798929193">"Новая папка"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Папки"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Виджеты"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Папка"</string>
     <string name="add_clock" msgid="2337943840175865746">"Часы"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Рамка фотографии"</string>
-    <string name="add_search" msgid="7104834713685095105">"Поиск"</string>
     <string name="out_of_space" msgid="8365249326091984698">"На этом главном экране нет свободного места."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Ярлык \"<xliff:g id="NAME">%s</xliff:g>\" создан"</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Ярлык \"<xliff:g id="NAME">%s</xliff:g>\" удален."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Позволяет приложению считывать настройки и ярлыки на главном экране."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"изменять настройки и ярлыки главного экрана"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Позволяет приложению изменять настройки и ярлыки на главном экране."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Поиск Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Не удалось загрузить виджет"</string>
 </resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index efc9227..6c54a46 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Lägg till på startsidan"</string>
     <string name="group_applications" msgid="4118484163419674240">"Program"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Genvägar"</string>
-    <string name="group_search" msgid="5905328940867162196">"Sök"</string>
     <string name="group_folder" msgid="5143593791798929193">"Ny mapp"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Mappar"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widgetar"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Mapp"</string>
     <string name="add_clock" msgid="2337943840175865746">"Klocka"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Bildram"</string>
-    <string name="add_search" msgid="7104834713685095105">"Sök"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Det finns inte plats för mer på den här startsidan."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"Genvägen \"<xliff:g id="NAME">%s</xliff:g>\" har skapats."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"Genvägen \"<xliff:g id="NAME">%s</xliff:g>\" har tagits bort."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Tillåter att ett program läser inställningar och genvägar på startsidan."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"skriva inställningar och genvägar för startsidan"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Tillåter att ett program ändrar inställningar och genvägar på startsidan."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Sök på Google"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Det gick inte att läsa in widgeten"</string>
 </resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 5e823ed..acf0775 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"Ana ekrana ekle"</string>
     <string name="group_applications" msgid="4118484163419674240">"Uygulamalar"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"Kısayollar"</string>
-    <string name="group_search" msgid="5905328940867162196">"Arama"</string>
     <string name="group_folder" msgid="5143593791798929193">"Yeni klasör"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"Klasörler"</string>
     <string name="group_widgets" msgid="6704978494073105844">"Widget\'lar"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"Klasör"</string>
     <string name="add_clock" msgid="2337943840175865746">"Saat"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"Resim çerçevesi"</string>
-    <string name="add_search" msgid="7104834713685095105">"Arama"</string>
     <string name="out_of_space" msgid="8365249326091984698">"Bu Ana ekranda başka yer yok."</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"\"<xliff:g id="NAME">%s</xliff:g>\" kısayolu oluşturuldu."</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"\"<xliff:g id="NAME">%s</xliff:g>\" kısayolu kaldırıldı."</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"Bir uygulamaya Ana Sayfadaki ayarları ve kısayolları okuma izni verir."</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"Ana Sayfa ayarlarını ve kısayollarını yaz"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"Bir uygulamaya Ana Sayfadaki ayarları ve kısayolları değiştirme izni verir."</string>
-    <string name="search_hint" msgid="6974176141372467453">"Google Arama"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"Widget yüklenirken sorun oluştu"</string>
 </resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 98eb170..e6dd9ca 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"添加到主屏幕"</string>
     <string name="group_applications" msgid="4118484163419674240">"应用程序"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"快捷方式"</string>
-    <string name="group_search" msgid="5905328940867162196">"搜索"</string>
     <string name="group_folder" msgid="5143593791798929193">"新建文件夹"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"文件夹"</string>
     <string name="group_widgets" msgid="6704978494073105844">"窗口小部件"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"文件夹"</string>
     <string name="add_clock" msgid="2337943840175865746">"时钟"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"相框"</string>
-    <string name="add_search" msgid="7104834713685095105">"搜索"</string>
     <string name="out_of_space" msgid="8365249326091984698">"此主屏幕上已没有空间。"</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"已创建“<xliff:g id="NAME">%s</xliff:g>”快捷方式。"</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"已删除“<xliff:g id="NAME">%s</xliff:g>”快捷方式。"</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"允许应用程序读取主屏幕的设置和快捷方式。"</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"写入主屏幕的设置和快捷方式"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"允许应用程序更改主屏幕的设置和快捷方式。"</string>
-    <string name="search_hint" msgid="6974176141372467453">"Google 搜索"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"载入窗口小部件时出现问题"</string>
 </resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 8d3d8a0..5e5ae95 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -30,7 +30,6 @@
     <string name="menu_item_add_item" msgid="6233177331075781114">"新增至首頁畫面"</string>
     <string name="group_applications" msgid="4118484163419674240">"應用程式"</string>
     <string name="group_shortcuts" msgid="9133529424900391877">"捷徑"</string>
-    <string name="group_search" msgid="5905328940867162196">"搜尋"</string>
     <string name="group_folder" msgid="5143593791798929193">"新資料夾"</string>
     <string name="group_live_folders" msgid="2664945399140647217">"資料夾"</string>
     <string name="group_widgets" msgid="6704978494073105844">"小工具"</string>
@@ -38,7 +37,6 @@
     <string name="add_folder" msgid="3521088587367839879">"資料夾"</string>
     <string name="add_clock" msgid="2337943840175865746">"時鐘"</string>
     <string name="add_photo_frame" msgid="3154058437359487954">"相框"</string>
-    <string name="add_search" msgid="7104834713685095105">"搜尋"</string>
     <string name="out_of_space" msgid="8365249326091984698">"首頁已無空間"</string>
     <string name="shortcut_installed" msgid="7071557296331322355">"已建立「<xliff:g id="NAME">%s</xliff:g>」捷徑。"</string>
     <string name="shortcut_uninstalled" msgid="2129499669449749995">"已移除「<xliff:g id="NAME">%s</xliff:g>」捷徑。"</string>
@@ -61,6 +59,5 @@
     <string name="permdesc_read_settings" msgid="8377434937176025492">"允許應用程式讀取首頁中的設定和捷徑。"</string>
     <string name="permlab_write_settings" msgid="1360567537236705628">"寫入首頁設定和捷徑"</string>
     <string name="permdesc_write_settings" msgid="1098648778383349818">"允許應用程式變更首頁中的設定和捷徑。"</string>
-    <string name="search_hint" msgid="6974176141372467453">"Google 搜尋"</string>
     <string name="gadget_error_text" msgid="8359351016167075858">"載入小工具時發生問題"</string>
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index e0ca384..78756ac 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -15,7 +15,6 @@
 -->
 
 <resources>
-    <dimen name="search_widget_inset">19dip</dimen>
     <dimen name="gesture_thumbnail_inset">8dip</dimen>
     <dimen name="gesture_thumbnail_size">64dip</dimen>
     <dimen name="button_bar_height">56dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 38f27c7..35d4733 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -56,8 +56,6 @@
     <string name="group_applications">Applications</string>
     <!-- Options in "Add to Home" dialog box; Title of the group containing the list of all shortcuts -->
     <string name="group_shortcuts">Shortcuts</string>
-    <!-- Options in "Add to Home" dialog box; Title of the search gadget -->
-    <string name="group_search">Search</string>
     <!-- Options in "Add to Home" dialog box; Title of the folder gadget -->
     <string name="group_folder">New folder</string>
     <!-- Options in "Add to Home" dialog box; Title of the group containing the list of all live folders -->
@@ -72,8 +70,6 @@
     <string name="add_clock">Clock</string>
     <!-- Options in "Add to Home" dialog box; Name of the Picture frame widget-->
     <string name="add_photo_frame">Picture frame</string>
-    <!-- Options in "Add to Home" dialog box; Name of the global search widget-->
-    <string name="add_search">Search</string>
     <!-- Error message when user has filled a home screen, possibly not used -->
     <string name="out_of_space">No more room on this Home screen.</string>
     <!-- Message displayed when a shortcut is created by an external application -->
@@ -126,12 +122,6 @@
     <!-- Widgets: -->
     <skip />    
 
-    <!-- TODO: Determine if this can be removed.
-         This is the hint text shown in the search widget, before text is entered.
-         This translation SHOULD MATCH the string "search_hint" which is found in 
-         GoogleSearch/res/values/strings.xml -->
-    <string name="search_hint">Google Search</string>
-
     <!-- Text to show user in place of a gadget when we can't display it properly -->
     <string name="gadget_error_text">Problem loading widget</string>
 
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 125a1be..f90810f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -35,8 +35,8 @@
         <item name="android:shadowRadius">2.0</item>
         <item name="android:textColor">#FFF</item>
         <item name="android:gravity">center_horizontal</item>
-        <item name="android:layout_width">fill_parent</item>
-        <item name="android:layout_height">fill_parent</item>
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">match_parent</item>
         <item name="android:background">@drawable/shortcut_selector</item>
         <item name="android:paddingLeft">5dip</item>
         <item name="android:paddingRight">5dip</item>
diff --git a/src/com/android/launcher2/ActivityPicker.java b/src/com/android/launcher2/ActivityPicker.java
deleted file mode 100644
index b6da08e..0000000
--- a/src/com/android/launcher2/ActivityPicker.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.launcher2;
-
-import com.android.internal.app.AlertActivity;
-import com.android.internal.app.AlertController;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.Intent.ShortcutIconResource;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.PaintFlagsDrawFilter;
-import android.graphics.PixelFormat;
-import android.graphics.Rect;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.Drawable;
-import android.graphics.drawable.PaintDrawable;
-import android.os.Bundle;
-import android.os.Parcelable;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Displays a list of all activities matching the incoming
- * {@link android.content.Intent#EXTRA_INTENT} query, along with any injected items.
- */
-public class ActivityPicker extends AlertActivity implements
-        DialogInterface.OnClickListener, DialogInterface.OnCancelListener {
-
-    /**
-     * Adapter of items that are displayed in this dialog.
-     */
-    private PickAdapter mAdapter;
-
-    /**
-     * Base {@link android.content.Intent} used when building list.
-     */
-    private Intent mBaseIntent;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        final Intent intent = getIntent();
-
-        // Read base intent from extras, otherwise assume default
-        Parcelable parcel = intent.getParcelableExtra(Intent.EXTRA_INTENT);
-        if (parcel instanceof Intent) {
-            mBaseIntent = (Intent) parcel;
-        } else {
-            mBaseIntent = new Intent(Intent.ACTION_MAIN, null);
-            mBaseIntent.addCategory(Intent.CATEGORY_DEFAULT);
-        }
-
-        // Create dialog parameters
-        AlertController.AlertParams params = mAlertParams;
-        params.mOnClickListener = this;
-        params.mOnCancelListener = this;
-
-        // Use custom title if provided, otherwise default window title
-        if (intent.hasExtra(Intent.EXTRA_TITLE)) {
-            params.mTitle = intent.getStringExtra(Intent.EXTRA_TITLE);
-        } else {
-            params.mTitle = getTitle();
-        }
-
-        // Build list adapter of pickable items
-        List<PickAdapter.Item> items = getItems();
-        mAdapter = new PickAdapter(this, items);
-        params.mAdapter = mAdapter;
-
-        setupAlert();
-    }
-
-    /**
-     * Handle clicking of dialog item by passing back
-     * {@link #getIntentForPosition(int)} in {@link #setResult(int, android.content.Intent)}.
-     */
-    public void onClick(DialogInterface dialog, int which) {
-        Intent intent = getIntentForPosition(which);
-        setResult(Activity.RESULT_OK, intent);
-        finish();
-    }
-
-    /**
-     * Handle canceled dialog by passing back {@link android.app.Activity#RESULT_CANCELED}.
-     */
-    public void onCancel(DialogInterface dialog) {
-        setResult(Activity.RESULT_CANCELED);
-        finish();
-    }
-
-    /**
-     * Build the specific {@link android.content.Intent} for a given list position. Convenience
-     * method that calls through to {@link PickAdapter.Item#getIntent(android.content.Intent)}.
-     */
-    protected Intent getIntentForPosition(int position) {
-        PickAdapter.Item item = (PickAdapter.Item) mAdapter.getItem(position);
-        return item.getIntent(mBaseIntent);
-    }
-
-    /**
-     * Build and return list of items to be shown in dialog. Default
-     * implementation mixes activities matching {@link #mBaseIntent} from
-     * {@link #putIntentItems(android.content.Intent, java.util.List)} with any injected items from
-     * {@link android.content.Intent#EXTRA_SHORTCUT_NAME}. Override this method in subclasses to
-     * change the items shown.
-     */
-    protected List<PickAdapter.Item> getItems() {
-        PackageManager packageManager = getPackageManager();
-        List<PickAdapter.Item> items = new ArrayList<PickAdapter.Item>();
-
-        // Add any injected pick items
-        final Intent intent = getIntent();
-        ArrayList<String> labels =
-            intent.getStringArrayListExtra(Intent.EXTRA_SHORTCUT_NAME);
-        ArrayList<ShortcutIconResource> icons =
-            intent.getParcelableArrayListExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE);
-
-        if (labels != null && icons != null && labels.size() == icons.size()) {
-            for (int i = 0; i < labels.size(); i++) {
-                String label = labels.get(i);
-                Drawable icon = null;
-
-                try {
-                    // Try loading icon from requested package
-                    ShortcutIconResource iconResource = icons.get(i);
-                    Resources res = packageManager.getResourcesForApplication(
-                            iconResource.packageName);
-                    icon = res.getDrawable(res.getIdentifier(
-                            iconResource.resourceName, null, null));
-                } catch (NameNotFoundException e) {
-                    // Ignore
-                }
-
-                items.add(new PickAdapter.Item(this, label, icon));
-            }
-        }
-
-        // Add any intent items if base was given
-        if (mBaseIntent != null) {
-            putIntentItems(mBaseIntent, items);
-        }
-
-        return items;
-    }
-
-    /**
-     * Fill the given list with any activities matching the base {@link android.content.Intent}.
-     */
-    protected void putIntentItems(Intent baseIntent, List<PickAdapter.Item> items) {
-        PackageManager packageManager = getPackageManager();
-        List<ResolveInfo> list = packageManager.queryIntentActivities(baseIntent,
-                0 /* no flags */);
-        Collections.sort(list, new ResolveInfo.DisplayNameComparator(packageManager));
-
-        final int listSize = list.size();
-        for (int i = 0; i < listSize; i++) {
-            ResolveInfo resolveInfo = list.get(i);
-            items.add(new PickAdapter.Item(this, packageManager, resolveInfo));
-        }
-    }
-
-    /**
-     * Adapter which shows the set of activities that can be performed for a
-     * given {@link android.content.Intent}.
-     */
-    protected static class PickAdapter extends BaseAdapter {
-
-        /**
-         * Item that appears in a {@link PickAdapter} list.
-         */
-        public static class Item {
-            protected static IconResizer sResizer;
-
-            protected IconResizer getResizer(Context context) {
-                if (sResizer == null) {
-                    sResizer = new IconResizer(context);
-                }
-                return sResizer;
-            }
-
-            CharSequence label;
-            Drawable icon;
-            String packageName;
-            String className;
-            Bundle extras;
-
-            /**
-             * Create a list item from given label and icon.
-             */
-            Item(Context context, CharSequence label, Drawable icon) {
-                this.label = label;
-                this.icon = getResizer(context).createIconThumbnail(icon);
-            }
-
-            /**
-             * Create a list item and fill it with details from the given
-             * {@link android.content.pm.ResolveInfo} object.
-             */
-            Item(Context context, PackageManager pm, ResolveInfo resolveInfo) {
-                label = resolveInfo.loadLabel(pm);
-                if (label == null && resolveInfo.activityInfo != null) {
-                    label = resolveInfo.activityInfo.name;
-                }
-
-                icon = getResizer(context).createIconThumbnail(resolveInfo.loadIcon(pm));
-                packageName = resolveInfo.activityInfo.applicationInfo.packageName;
-                className = resolveInfo.activityInfo.name;
-            }
-
-            Intent getIntent(Intent baseIntent) {
-                Intent intent = new Intent(baseIntent);
-                if (packageName != null && className != null) {
-                    // Valid package and class, so fill details as normal intent
-                    intent.setClassName(packageName, className);
-                    if (extras != null) {
-                        intent.putExtras(extras);
-                    }
-                } else {
-                    // No valid package or class, so treat as shortcut with label
-                    intent.setAction(Intent.ACTION_CREATE_SHORTCUT);
-                    intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, label);
-                }
-                return intent;
-            }
-        }
-
-        private final LayoutInflater mInflater;
-
-        private List<Item> mItems;
-        private int mLayoutRes = R.layout.pick_item;
-
-        /**
-         * Create an adapter for the given items.
-         */
-        public PickAdapter(Context context, List<Item> items) {
-            mInflater = (LayoutInflater)
-                    context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-            mItems = items;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public int getCount() {
-            return mItems.size();
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public Object getItem(int position) {
-            return mItems.get(position);
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public long getItemId(int position) {
-            return position;
-        }
-
-        /**
-         * {@inheritDoc}
-         */
-        public View getView(int position, View convertView, ViewGroup parent) {
-            if (convertView == null) {
-                convertView = mInflater.inflate(mLayoutRes, parent, false);
-            }
-
-            Item item = (Item) getItem(position);
-            TextView textView = (TextView) convertView;
-            textView.setText(item.label);
-            textView.setCompoundDrawablesWithIntrinsicBounds(item.icon, null, null, null);
-
-            return convertView;
-        }
-    }
-
-    /**
-     * Utility class to resize icons to match default icon size. Code is mostly
-     * borrowed from Launcher.
-     */
-    private static class IconResizer {
-        private int mIconWidth = -1;
-        private int mIconHeight = -1;
-
-        private final Rect mOldBounds = new Rect();
-        private Canvas mCanvas = new Canvas();
-        private Resources mResources;
-
-        public IconResizer(Context context) {
-            mCanvas.setDrawFilter(new PaintFlagsDrawFilter(Paint.DITHER_FLAG,
-                    Paint.FILTER_BITMAP_FLAG));
-
-            mResources = context.getResources();
-            mIconWidth = mIconHeight = (int) mResources.getDimension(
-                    android.R.dimen.app_icon_size);
-        }
-
-        /**
-         * Returns a Drawable representing the thumbnail of the specified Drawable.
-         * The size of the thumbnail is defined by the dimension
-         * android.R.dimen.launcher_application_icon_size.
-         *
-         * This method is not thread-safe and should be invoked on the UI thread only.
-         *
-         * @param icon The icon to get a thumbnail of.
-         *
-         * @return A thumbnail for the specified icon or the icon itself if the
-         *         thumbnail could not be created.
-         */
-        public Drawable createIconThumbnail(Drawable icon) {
-            int width = mIconWidth;
-            int height = mIconHeight;
-
-            if (icon == null) {
-                return null;
-            }
-
-            final int iconWidth = icon.getIntrinsicWidth();
-            final int iconHeight = icon.getIntrinsicHeight();
-
-            if (icon instanceof PaintDrawable) {
-                PaintDrawable painter = (PaintDrawable) icon;
-                painter.setIntrinsicWidth(width);
-                painter.setIntrinsicHeight(height);
-            }
-
-            if (width > 0 && height > 0) {
-                if (width < iconWidth || height < iconHeight) {
-                    final float ratio = (float) iconWidth / iconHeight;
-
-                    if (iconWidth > iconHeight) {
-                        height = (int) (width / ratio);
-                    } else if (iconHeight > iconWidth) {
-                        width = (int) (height * ratio);
-                    }
-
-                    final Bitmap.Config c = icon.getOpacity() != PixelFormat.OPAQUE ?
-                                Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565;
-                    final Bitmap thumb = Bitmap.createBitmap(mIconWidth, mIconHeight, c);
-                    final Canvas canvas = mCanvas;
-                    canvas.setBitmap(thumb);
-                    // Copy the old bounds to restore them later
-                    // If we were to do oldBounds = icon.getBounds(),
-                    // the call to setBounds() that follows would
-                    // change the same instance and we would lose the
-                    // old bounds
-                    mOldBounds.set(icon.getBounds());
-                    final int x = (mIconWidth - width) / 2;
-                    final int y = (mIconHeight - height) / 2;
-                    icon.setBounds(x, y, x + width, y + height);
-                    icon.draw(canvas);
-                    icon.setBounds(mOldBounds);
-                    icon = new BitmapDrawable(mResources, thumb);
-                } else if (iconWidth < width && iconHeight < height) {
-                    final Bitmap.Config c = Bitmap.Config.ARGB_8888;
-                    final Bitmap thumb = Bitmap.createBitmap(mIconWidth, mIconHeight, c);
-                    final Canvas canvas = mCanvas;
-                    canvas.setBitmap(thumb);
-                    mOldBounds.set(icon.getBounds());
-                    final int x = (width - iconWidth) / 2;
-                    final int y = (height - iconHeight) / 2;
-                    icon.setBounds(x, y, x + iconWidth, y + iconHeight);
-                    icon.draw(canvas);
-                    icon.setBounds(mOldBounds);
-                    icon = new BitmapDrawable(mResources, thumb);
-                }
-            }
-
-            return icon;
-        }
-    }
-}
diff --git a/src/com/android/launcher2/AllAppsList.java b/src/com/android/launcher2/AllAppsList.java
index 561b345..00e9ea8 100644
--- a/src/com/android/launcher2/AllAppsList.java
+++ b/src/com/android/launcher2/AllAppsList.java
@@ -17,25 +17,13 @@
 package com.android.launcher2;
 
 import android.content.ComponentName;
-import android.content.ContentResolver;
-import android.content.ContentValues;
 import android.content.Intent;
 import android.content.Context;
 import android.content.pm.ActivityInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
-import android.content.res.Resources;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.drawable.Drawable;
-import android.net.Uri;
-import android.util.Log;
-import android.os.Process;
 
-import java.lang.ref.WeakReference;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 
 
@@ -46,13 +34,15 @@
     public static final int DEFAULT_APPLICATIONS_NUMBER = 42;
     
     /** The list off all apps. */
-    public ArrayList<ApplicationInfo> data = new ArrayList(DEFAULT_APPLICATIONS_NUMBER);
+    public ArrayList<ApplicationInfo> data =
+            new ArrayList<ApplicationInfo>(DEFAULT_APPLICATIONS_NUMBER);
     /** The list of apps that have been added since the last notify() call. */
-    public ArrayList<ApplicationInfo> added = new ArrayList(DEFAULT_APPLICATIONS_NUMBER);
+    public ArrayList<ApplicationInfo> added =
+            new ArrayList<ApplicationInfo>(DEFAULT_APPLICATIONS_NUMBER);
     /** The list of apps that have been removed since the last notify() call. */
-    public ArrayList<ApplicationInfo> removed = new ArrayList();
+    public ArrayList<ApplicationInfo> removed = new ArrayList<ApplicationInfo>();
     /** The list of apps that have been modified since the last notify() call. */
-    public ArrayList<ApplicationInfo> modified = new ArrayList();
+    public ArrayList<ApplicationInfo> modified = new ArrayList<ApplicationInfo>();
 
     /**
      * Boring constructor.
@@ -106,7 +96,7 @@
      */
     public void removePackage(String packageName) {
         final List<ApplicationInfo> data = this.data;
-        for (int i=data.size()-1; i>=0; i--) {
+        for (int i = data.size() - 1; i >= 0; i--) {
             ApplicationInfo info = data.get(i);
             final ComponentName component = info.intent.getComponent();
             if (packageName.equals(component.getPackageName())) {
@@ -126,7 +116,7 @@
         if (matches.size() > 0) {
             // Find disabled/removed activities and remove them from data and add them
             // to the removed list.
-            for (int i=data.size()-1; i>=0; i--) {
+            for (int i = data.size() - 1; i >= 0; i--) {
                 final ApplicationInfo applicationInfo = data.get(i);
                 final ComponentName component = applicationInfo.intent.getComponent();
                 if (packageName.equals(component.getPackageName())) {
@@ -142,7 +132,7 @@
             // Also updates existing activities with new labels/icons
             Utilities.BubbleText bubble = new Utilities.BubbleText(context);
             int count = matches.size();
-            for (int i=0; i<count; i++) {
+            for (int i = 0; i < count; i++) {
                 final ResolveInfo info = matches.get(i);
                 ApplicationInfo applicationInfo = findApplicationInfoLocked(
                         info.activityInfo.applicationInfo.packageName,
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 37ec15c..999844d 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -114,8 +114,10 @@
 
     private boolean mShouldGainFocus;
 
+    private boolean mHaveSurface = false;
     private boolean mZoomDirty = false;
     private boolean mAnimateNextZoom;
+    private float mNextZoom;
     private float mZoom;
     private float mPosX;
     private float mVelocity;
@@ -125,12 +127,19 @@
         public static final int ALLOC_PARAMS = 0;
         public static final int ALLOC_STATE = 1;
         public static final int ALLOC_ICON_IDS = 3;
+        public static final int ALLOC_LABEL_IDS = 4;
+        public static final int ALLOC_VP_CONSTANTS = 5;
 
         public static final int COLUMNS_PER_PAGE = 4;
         public static final int ROWS_PER_PAGE = 4;
 
-        public static final int ICON_TEXTURE_WIDTH_PX = 128;
-        public static final int ICON_TEXTURE_HEIGHT_PX = 128;
+        public static final int ICON_WIDTH_PX = 64;
+        public static final int ICON_TEXTURE_WIDTH_PX = 74;
+        public static final int SELECTION_TEXTURE_WIDTH_PX = 74 + 20;
+
+        public static final int ICON_HEIGHT_PX = 64;
+        public static final int ICON_TEXTURE_HEIGHT_PX = 74;
+        public static final int SELECTION_TEXTURE_HEIGHT_PX = 74 + 20;
 
         public int SCREEN_WIDTH_PX;
         public int SCREEN_HEIGHT_PX;
@@ -185,9 +194,12 @@
     @Override
     public void surfaceDestroyed(SurfaceHolder holder) {
         super.surfaceDestroyed(holder);
-        mRollo.mHasSurface = false;
         // Without this, we leak mMessageCallback which leaks the context.
         mRS.mMessageCallback = null;
+        // We may lose any callbacks that are pending, so make sure that we re-sync that
+        // on the next surfaceChanged.
+        mZoomDirty = true;
+        mHaveSurface = false;
     }
 
     @Override
@@ -196,9 +208,10 @@
 
         super.surfaceChanged(holder, format, w, h);
 
+        mHaveSurface = true;
+
         if (mRollo == null) {
             mRollo = new RolloRS();
-            mRollo.mHasSurface = true;
             mRollo.init(getResources(), w, h);
             if (mAllAppsList != null) {
                 mRollo.setApps(mAllAppsList);
@@ -207,8 +220,6 @@
                 gainFocus();
                 mShouldGainFocus = false;
             }
-        } else {
-            mRollo.mHasSurface = true;
         }
         mRollo.dirtyCheck();
         mRollo.resize(w, h);
@@ -267,7 +278,7 @@
         }
 
         if (gainFocus) {
-            if (mRollo != null && mRollo.mHasSurface) {
+            if (mRollo != null) {
                 gainFocus();
             } else {
                 mShouldGainFocus = true;
@@ -567,8 +578,7 @@
                 && mCurrentIconIndex >= 0 && mCurrentIconIndex < mAllAppsList.size()) {
             ApplicationInfo app = mAllAppsList.get(mCurrentIconIndex);
 
-            Bitmap bmp = Utilities.extractIconFromTexture(app.iconBitmap, getContext());
-
+            Bitmap bmp = app.iconBitmap;
             final int w = bmp.getWidth();
             final int h = bmp.getHeight();
 
@@ -576,9 +586,10 @@
             int screenX = mMotionDownRawX - (w / 2);
             int screenY = mMotionDownRawY - h;
 
+            int left = (mDefines.ICON_TEXTURE_WIDTH_PX - mDefines.ICON_WIDTH_PX) / 2;
+            int top = (mDefines.ICON_TEXTURE_HEIGHT_PX - mDefines.ICON_HEIGHT_PX) / 2;
             mDragController.startDrag(bmp, screenX, screenY,
                     0, 0, w, h, this, app, DragController.DRAG_ACTION_COPY);
-            bmp.recycle();
 
             mLauncher.closeAllApps(true);
         }
@@ -636,10 +647,13 @@
      */
     public void zoom(float zoom, boolean animate) {
         cancelLongPress();
-        if (mRollo == null || !mRollo.mHasSurface) {
+        mNextZoom = zoom;
+        mAnimateNextZoom = animate;
+        // if we do setZoom while we don't have a surface, we won't
+        // get the callbacks that actually set mZoom.
+        if (mRollo == null || !mHaveSurface) {
             mZoomDirty = true;
             mZoom = zoom;
-            mAnimateNextZoom = animate;
             return;
         } else {
             mRollo.setZoom(zoom, animate);
@@ -772,13 +786,16 @@
         private ProgramStore mPSText;
         private ProgramFragment mPFColor;
         private ProgramFragment mPFTexMip;
+        private ProgramFragment mPFTexMipAlpha;
         private ProgramFragment mPFTexNearest;
         private ProgramVertex mPV;
         private ProgramVertex mPVOrtho;
+        private ProgramVertex mPVCurve;
         private SimpleMesh mMesh;
-        private SimpleMesh mMesh2;
         private ProgramVertex.MatrixAllocation mPVA;
 
+        private Allocation mUniformAlloc;
+
         private Allocation mHomeButtonNormal;
         private Allocation mHomeButtonFocused;
         private Allocation mHomeButtonPressed;
@@ -786,6 +803,10 @@
         private Allocation[] mIcons;
         private int[] mIconIds;
         private Allocation mAllocIconIds;
+
+        private Allocation[] mLabels;
+        private int[] mLabelIds;
+        private Allocation mAllocLabelIds;
         private Allocation mSelectedIcon;
 
         private int[] mTouchYBorders;
@@ -794,9 +815,6 @@
         private Bitmap mSelectionBitmap;
         private Canvas mSelectionCanvas;
 
-        boolean mHasSurface = false;
-        private boolean mAppsDirty = true;
-
         Params mParams;
         State mState;
 
@@ -860,49 +878,27 @@
             initProgramVertex();
             initProgramFragment();
             initProgramStore();
-            initMesh();
+            //initMesh();
             initGl();
             initData();
             initTouchState();
             initRs();
         }
 
-        public void initMesh() {
-            SimpleMesh.TriangleMeshBuilder tm = new SimpleMesh.TriangleMeshBuilder(mRS, 3,
-                SimpleMesh.TriangleMeshBuilder.TEXTURE_0 | SimpleMesh.TriangleMeshBuilder.COLOR);
+        public void initMesh2() {
+            SimpleMesh.TriangleMeshBuilder tm = new SimpleMesh.TriangleMeshBuilder(mRS, 2, 0);
 
-            float y = 0;
-            float z = 0;
-            for (int ct=0; ct < 200; ct++) {
-                float angle = 0;
-                float maxAngle = 3.14f * 0.16f;
-                float l = 1.f;
-
-                l = 1 - ((ct-7) * 0.10f);
-                if (ct > 7) {
-                    angle = maxAngle * (ct - 7) * 0.2f;
-                    angle = Math.min(angle, maxAngle);
-                }
-                l = Math.max(0.4f, l);
-                l = Math.min(1.0f, l);
-
-                y += 0.1f * Math.cos(angle);
-                z += 0.1f * Math.sin(angle);
-
-                float t = 0.1f * ct;
-                float ds = 0.08f;
-                tm.setColor(l, l, l, 0.99f);
-                tm.setTexture(ds, t);
-                tm.addVertex(-0.5f, y, z);
-                tm.setTexture(1 - ds, t);
-                tm.addVertex(0.5f, y, z);
+            for (int ct=0; ct < 16; ct++) {
+                float pos = (1.f / 16.f) * ct;
+                tm.addVertex(0.0f, pos);
+                tm.addVertex(1.0f, pos);
             }
-            for (int ct=0; ct < (200 * 2 - 2); ct+= 2) {
+            for (int ct=0; ct < (16 * 2 - 2); ct+= 2) {
                 tm.addTriangle(ct, ct+1, ct+2);
                 tm.addTriangle(ct+1, ct+3, ct+2);
             }
-            mMesh2 = tm.create();
-            mMesh2.setName("SMMesh");
+            mMesh = tm.create();
+            mMesh.setName("SMCell");
         }
 
         void resize(int w, int h) {
@@ -921,6 +917,72 @@
             mPV.setName("PV");
             mPV.bindAllocation(mPVA);
 
+            Element.Builder eb = new Element.Builder(mRS);
+            eb.add(Element.createVector(mRS, Element.DataType.FLOAT_32, 2), "ImgSize");
+            eb.add(Element.createVector(mRS, Element.DataType.FLOAT_32, 4), "Position");
+            Element e = eb.create();
+
+            mUniformAlloc = Allocation.createSized(mRS, e, 1);
+
+            initMesh2();
+            ProgramVertex.ShaderBuilder sb = new ProgramVertex.ShaderBuilder(mRS);
+            String t = new String("void main() {\n" +
+                                  // Animation
+                                  "  float ani = UNI_Position.z;\n" +
+
+                                  "  float scale = (2.0 / 480.0);\n" +
+                                  "  float x = UNI_Position.x + UNI_ImgSize.x * (1.0 - ani) * (ATTRIB_position.x - 0.5);\n" +
+                                  "  float ys= UNI_Position.y + UNI_ImgSize.y * (1.0 - ani) * ATTRIB_position.y;\n" +
+                                  "  float y = 0.0;\n" +
+                                  "  float z = 0.0;\n" +
+                                  "  float lum = 1.0;\n" +
+
+                                  "  float cv = min(ys, 50.0) - 50.0;\n" +
+                                  "  y += cv * 0.681;\n" +  // Roughy 47 degrees
+                                  "  z += -cv * 0.731;\n" +
+                                  "  cv = clamp(ys, 50.0, 120.0) - 120.0;\n" +  // curve range
+                                  "  y += cv * cos(cv * 0.4 / (180.0 / 3.14));\n" +
+                                  "  z += cv * sin(cv * 0.4 / (180.0 / 3.14));\n" +
+
+                                  "  cv = max(ys, 750.0) - 750.0;\n" +
+                                  "  y += cv * 0.681;\n" +
+                                  "  z += cv * 0.731;\n" +
+                                  "  cv = clamp(ys, 680.0, 750.0) - 680.0;\n" +
+                                  "  y += cv * cos(cv * 0.4 / (180.0 / 3.14));\n" +
+                                  "  z += cv * sin(cv * 0.4 / (180.0 / 3.14));\n" +
+
+                                  "  y += clamp(ys, 120.0, 680.0);\n" +
+                                  "  lum += (clamp(ys, 60.0, 115.0) - 115.0) / 100.0;\n" +
+                                  "  lum -= (clamp(ys, 685.0, 740.0) - 685.0) / 100.0;\n" +
+
+                                  "  vec4 pos;\n" +
+                                  "  pos.x = x * scale - 1.0;\n" +
+                                  "  pos.y = y * scale - 1.66;\n" +
+                                  "  pos.z = z * scale;\n" +
+                                  "  pos.w = 1.0;\n" +
+
+                                  "  pos.x *= 1.0 + ani * 4.0;\n" +
+                                  "  pos.y *= 1.0 + ani * 4.0;\n" +
+                                  "  pos.z -= ani * 1.5;\n" +
+                                  "  lum *= 1.0 - ani;\n" +
+
+                                  "  gl_Position = UNI_MVP * pos;\n" +
+                                  "  varColor.rgba = vec4(lum, lum, lum, 1.0);\n" +
+                                  "  varTex0.xy = ATTRIB_position;\n" +
+                                  "  varTex0.y = 1.0 - varTex0.y;\n" +
+                                  "  varTex0.zw = vec2(0.0, 0.0);\n" +
+                                  "}\n");
+            sb.setShader(t);
+            sb.addConstant(mUniformAlloc.getType());
+            sb.addInput(mMesh.getVertexType(0).getElement());
+            mPVCurve = sb.create();
+            mPVCurve.setName("PVCurve");
+            mPVCurve.bindAllocation(mPVA);
+            mPVCurve.bindConstants(mUniformAlloc, 1);
+
+            float tf[] = new float[] {72.f, 72.f, 0.f, 0.f, 120.f, 120.f, 0.f, 0.f};
+            mUniformAlloc.data(tf);
+
             //pva = new ProgramVertex.MatrixAllocation(mRS);
             //pva.setupOrthoWindow(mWidth, mHeight);
             //pvb.setTextureMatrixEnable(true);
@@ -934,7 +996,7 @@
         private void initProgramFragment() {
             Sampler.Builder sb = new Sampler.Builder(mRS);
             sb.setMin(Sampler.Value.LINEAR_MIP_LINEAR);
-            sb.setMag(Sampler.Value.LINEAR);
+            sb.setMag(Sampler.Value.NEAREST);
             sb.setWrapS(Sampler.Value.CLAMP);
             sb.setWrapT(Sampler.Value.CLAMP);
             Sampler linear = sb.create();
@@ -943,12 +1005,12 @@
             sb.setMag(Sampler.Value.NEAREST);
             Sampler nearest = sb.create();
 
-            ProgramFragment.Builder bf = new ProgramFragment.Builder(mRS, null, null);
-            mPFColor = bf.create();
-            mPFColor.setName("PFColor");
+            ProgramFragment.Builder bf = new ProgramFragment.Builder(mRS);
+            //mPFColor = bf.create();
+            //mPFColor.setName("PFColor");
 
-            bf.setTexEnable(true, 0);
-            bf.setTexEnvMode(ProgramFragment.EnvMode.MODULATE, 0);
+            bf.setTexture(ProgramFragment.Builder.EnvMode.MODULATE,
+                          ProgramFragment.Builder.Format.RGBA, 0);
             mPFTexMip = bf.create();
             mPFTexMip.setName("PFTexMip");
             mPFTexMip.bindSampler(linear, 0);
@@ -956,6 +1018,13 @@
             mPFTexNearest = bf.create();
             mPFTexNearest.setName("PFTexNearest");
             mPFTexNearest.bindSampler(nearest, 0);
+
+            bf.setTexture(ProgramFragment.Builder.EnvMode.MODULATE,
+                          ProgramFragment.Builder.Format.ALPHA, 0);
+            mPFTexMipAlpha = bf.create();
+            mPFTexMipAlpha.setName("PFTexMipAlpha");
+            mPFTexMipAlpha.bindSampler(linear, 0);
+
         }
 
         private void initProgramStore() {
@@ -1008,8 +1077,8 @@
             mParams.save();
             mState.save();
 
-            mSelectionBitmap = Bitmap.createBitmap(Defines.ICON_TEXTURE_WIDTH_PX,
-                    Defines.ICON_TEXTURE_HEIGHT_PX, Bitmap.Config.ARGB_8888);
+            mSelectionBitmap = Bitmap.createBitmap(Defines.SELECTION_TEXTURE_WIDTH_PX,
+                    Defines.SELECTION_TEXTURE_HEIGHT_PX, Bitmap.Config.ARGB_8888);
             mSelectionCanvas = new Canvas(mSelectionBitmap);
 
             setApps(null);
@@ -1020,11 +1089,12 @@
 
         private void initRs() {
             ScriptC.Builder sb = new ScriptC.Builder(mRS);
-            sb.setScript(mRes, R.raw.rollo3);
+            sb.setScript(mRes, R.raw.allapps);
             sb.setRoot(true);
             sb.addDefines(mDefines);
             sb.setType(mParams.mType, "params", Defines.ALLOC_PARAMS);
             sb.setType(mState.mType, "state", Defines.ALLOC_STATE);
+            sb.setType(mUniformAlloc.getType(), "vpConstants", Defines.ALLOC_VP_CONSTANTS);
             mInvokeMove = sb.addInvokable("move");
             mInvokeFling = sb.addInvokable("fling");
             mInvokeMoveTo = sb.addInvokable("moveTo");
@@ -1035,22 +1105,15 @@
             mScript.bindAllocation(mParams.mAlloc, Defines.ALLOC_PARAMS);
             mScript.bindAllocation(mState.mAlloc, Defines.ALLOC_STATE);
             mScript.bindAllocation(mAllocIconIds, Defines.ALLOC_ICON_IDS);
+            mScript.bindAllocation(mAllocLabelIds, Defines.ALLOC_LABEL_IDS);
+            mScript.bindAllocation(mUniformAlloc, Defines.ALLOC_VP_CONSTANTS);
 
             mRS.contextBindRootScript(mScript);
         }
 
         void dirtyCheck() {
-            if (mHasSurface) {
-                if (mAppsDirty && mAllAppsList != null) {
-                    for (int i=0; i < mState.iconCount; i++) {
-                        uploadAppIcon(i, mAllAppsList.get(i));
-                    }
-                    saveAppsList();
-                    mAppsDirty = false;
-                }
-                if (mZoomDirty) {
-                    setZoom(mZoom, mAnimateNextZoom);
-                }
+            if (mZoomDirty) {
+                setZoom(mNextZoom, mAnimateNextZoom);
             }
         }
 
@@ -1065,21 +1128,18 @@
             mIconIds = new int[allocCount];
             mAllocIconIds = Allocation.createSized(mRS, Element.USER_I32(mRS), allocCount);
 
+            mLabels = new Allocation[count];
+            mLabelIds = new int[allocCount];
+            mAllocLabelIds = Allocation.createSized(mRS, Element.USER_I32(mRS), allocCount);
+
             Element ie8888 = Element.RGBA_8888(mRS);
 
             mState.iconCount = count;
-            long before = SystemClock.uptimeMillis();
             for (int i=0; i < mState.iconCount; i++) {
                 createAppIconAllocations(i, list.get(i));
             }
-            long after = SystemClock.uptimeMillis();
-            //Log.d(TAG, "createAppIconAllocations took " + (after-before) + "ms");
-            if (mHasSurface) {
-                for (int i=0; i < mState.iconCount; i++) {
-                    uploadAppIcon(i, list.get(i));
-                }
-            } else {
-                mRollo.mAppsDirty = true;
+            for (int i=0; i < mState.iconCount; i++) {
+                uploadAppIcon(i, list.get(i));
             }
             saveAppsList();
         }
@@ -1098,29 +1158,13 @@
             }
         }
 
-        private void frameBitmapAllocMips(Allocation alloc, int w, int h) {
-            int black[] = new int[w > h ? w : h];
-            Allocation.Adapter2D a = alloc.createAdapter2D();
-            int mip = 0;
-            while (w > 1 || h > 1) {
-                a.subData(0, 0, 1, h, black);
-                a.subData(w-1, 0, 1, h, black);
-                a.subData(0, 0, w, 1, black);
-                a.subData(0, h-1, w, 1, black);
-                mip++;
-                w = (w + 1) >> 1;
-                h = (h + 1) >> 1;
-                a.setConstraint(Dimension.LOD, mip);
-            }
-            a.subData(0, 0, 1, 1, black);
-        }
-
         private void createAppIconAllocations(int index, ApplicationInfo item) {
-            Bitmap bitmap = item.iconBitmap;
-            mIcons[index] = Allocation.createFromBitmap(mRS, bitmap, Element.RGBA_8888(mRS), true);
-            frameBitmapAllocMips(mIcons[index], bitmap.getWidth(), bitmap.getHeight());
-
+            mIcons[index] = Allocation.createFromBitmap(mRS, item.iconBitmap,
+                    Element.RGBA_8888(mRS), true);
+            mLabels[index] = Allocation.createFromBitmap(mRS, item.titleBitmap,
+                    Element.A_8(mRS), true);
             mIconIds[index] = mIcons[index].getID();
+            mLabelIds[index] = mLabels[index].getID();
         }
 
         private void uploadAppIcon(int index, ApplicationInfo item) {
@@ -1131,6 +1175,7 @@
                     + " item=" + item);
             }
             mIcons[index].uploadToTexture(0);
+            mLabels[index].uploadToTexture(0);
         }
 
         /**
@@ -1142,13 +1187,21 @@
             int[] iconIds = new int[count];
             mAllocIconIds = Allocation.createSized(mRS, Element.USER_I32(mRS), count);
 
+            Allocation[] labels = new Allocation[count];
+            int[] labelIds = new int[count];
+            mAllocLabelIds = Allocation.createSized(mRS, Element.USER_I32(mRS), count);
+
             final int oldCount = mRollo.mState.iconCount;
 
             System.arraycopy(mIcons, 0, icons, 0, oldCount);
             System.arraycopy(mIconIds, 0, iconIds, 0, oldCount);
+            System.arraycopy(mLabels, 0, labels, 0, oldCount);
+            System.arraycopy(mLabelIds, 0, labelIds, 0, oldCount);
 
             mIcons = icons;
             mIconIds = iconIds;
+            mLabels = labels;
+            mLabelIds = labelIds;
         }
 
         /**
@@ -1160,15 +1213,11 @@
 
             System.arraycopy(mIcons, index, mIcons, dest, count);
             System.arraycopy(mIconIds, index, mIconIds, dest, count);
+            System.arraycopy(mLabels, index, mLabels, dest, count);
+            System.arraycopy(mLabelIds, index, mLabelIds, dest, count);
 
             createAppIconAllocations(index, item);
-
-            if (mHasSurface) {
-                uploadAppIcon(index, item);
-            } else {
-                mAppsDirty = true;
-            }
-
+            uploadAppIcon(index, item);
             mRollo.mState.iconCount++;
         }
 
@@ -1181,12 +1230,16 @@
 
             System.arraycopy(mIcons, src, mIcons, index, count);
             System.arraycopy(mIconIds, src, mIconIds, index, count);
+            System.arraycopy(mLabels, src, mLabels, index, count);
+            System.arraycopy(mLabelIds, src, mLabelIds, index, count);
 
             mRollo.mState.iconCount--;
             final int last = mState.iconCount;
 
             mIcons[last] = null;
             mIconIds[last] = 0;
+            mLabels[last] = null;
+            mLabelIds[last] = 0;
         }
 
         /**
@@ -1196,9 +1249,11 @@
             mRS.contextBindRootScript(null);
 
             mAllocIconIds.data(mIconIds);
+            mAllocLabelIds.data(mLabelIds);
 
             if (mScript != null) { // this happens when we init it
                 mScript.bindAllocation(mAllocIconIds, Defines.ALLOC_ICON_IDS);
+                mScript.bindAllocation(mAllocLabelIds, Defines.ALLOC_LABEL_IDS);
             }
 
             mState.save();
@@ -1313,7 +1368,7 @@
                 ApplicationInfo info = mAllAppsList.get(index);
                 Bitmap selectionBitmap = mSelectionBitmap;
 
-                Utilities.drawSelectedAllAppsBitmap(mSelectionCanvas, selectionBitmap,
+                Utilities.drawSelectedAllAppsBitmap(mSelectionCanvas,
                         selectionBitmap.getWidth(), selectionBitmap.getHeight(),
                         pressed == SELECTED_PRESSED, info.iconBitmap);
 
@@ -1368,10 +1423,12 @@
                 Log.d(TAG, "mRollo.mIconIds.length=" + mIconIds.length);
             }
             Log.d(TAG, "mRollo.mIconIds=" +  Arrays.toString(mIconIds));
+            if (mLabelIds != null) {
+                Log.d(TAG, "mRollo.mLabelIds.length=" + mLabelIds.length);
+            }
+            Log.d(TAG, "mRollo.mLabelIds=" +  Arrays.toString(mLabelIds));
             Log.d(TAG, "mRollo.mTouchXBorders=" +  Arrays.toString(mTouchXBorders));
             Log.d(TAG, "mRollo.mTouchYBorders=" +  Arrays.toString(mTouchYBorders));
-            Log.d(TAG, "mRollo.mHasSurface=" + mHasSurface);
-            Log.d(TAG, "mRollo.mAppsDirty=" + mAppsDirty);
             Log.d(TAG, "mRollo.mState.newPositionX=" + mState.newPositionX);
             Log.d(TAG, "mRollo.mState.newTouchDown=" + mState.newTouchDown);
             Log.d(TAG, "mRollo.mState.flingVelocity=" + mState.flingVelocity);
diff --git a/src/com/android/launcher2/AppInfoCache.java b/src/com/android/launcher2/AppInfoCache.java
index e81168e..a2d9830 100644
--- a/src/com/android/launcher2/AppInfoCache.java
+++ b/src/com/android/launcher2/AppInfoCache.java
@@ -168,13 +168,10 @@
             application.title = info.activityInfo.name;
         }
 
-        // TODO: turn this on in froyo, not enough time for testing in mr3
-        //if (application.iconBitmap != null) {
-        //    application.iconBitmap.recycle();
-        //}
         application.iconBitmap = Utilities.createAllAppsBitmap(
-                info.activityInfo.loadIcon(packageManager),
-                application.title.toString(), bubble, context);
+                info.activityInfo.loadIcon(packageManager), context);
+
+        application.titleBitmap = bubble.createTextBitmap(application.title.toString());
     }
 }
 
diff --git a/src/com/android/launcher2/ApplicationInfo.java b/src/com/android/launcher2/ApplicationInfo.java
index ae0e219..0fe84e7 100644
--- a/src/com/android/launcher2/ApplicationInfo.java
+++ b/src/com/android/launcher2/ApplicationInfo.java
@@ -37,6 +37,11 @@
     CharSequence title;
 
     /**
+     * A bitmap of the application's text in the bubble.
+     */
+    Bitmap titleBitmap;
+
+    /**
      * The intent used to start the application.
      */
     Intent intent;
@@ -47,7 +52,7 @@
     Drawable icon;
 
     /**
-     * What we show in all apps, including the text.
+     * A bitmap version of the application icon.
      */
     Bitmap iconBitmap;
 
@@ -144,9 +149,9 @@
             ArrayList<ApplicationInfo> list) {
         Log.d(tag, label + " size=" + list.size());
         for (ApplicationInfo info: list) {
-            Log.d(tag, "   title=\"" + info.title + "\" icon=" + info.icon
-                    + " iconBitmap=" + info.iconBitmap + " filtered=" + info.filtered
-                    + " customIcon=" + info.customIcon);
+            Log.d(tag, "   title=\"" + info.title + "\" titleBitmap=" + info.titleBitmap
+                    + " icon=" + info.icon + " iconBitmap=" + info.iconBitmap
+                    + " filtered=" + info.filtered + " customIcon=" + info.customIcon);
         }
     }
 }
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 6970875..df8ca89 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -901,7 +901,7 @@
         }
         
         public LayoutParams(int cellX, int cellY, int cellHSpan, int cellVSpan) {
-            super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+            super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
             this.cellX = cellX;
             this.cellY = cellY;
             this.cellHSpan = cellHSpan;
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index 590ca69..daabbcc 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -18,25 +18,18 @@
 
 import android.content.Context;
 import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Matrix;
 import android.graphics.Rect;
 import android.graphics.RectF;
 import android.os.IBinder;
 import android.os.Handler;
 import android.os.Vibrator;
-import android.os.SystemClock;
-import android.util.AttributeSet;
 import android.util.DisplayMetrics;
 import android.util.Log;
 import android.view.View;
-import android.view.ViewGroup;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
 import android.view.WindowManager;
 import android.view.inputmethod.InputMethodManager;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
 
 import java.util.ArrayList;
 
@@ -44,6 +37,7 @@
  * Class for initiating a drag within a view or across multiple views.
  */
 public class DragController {
+    @SuppressWarnings({"UnusedDeclaration"})
     private static final String TAG = "Launcher.DragController";
 
     /** Indicates the drag is a move.  */
@@ -113,6 +107,8 @@
     /** The view that will be scrolled when dragging to the left and right edges of the screen. */
     private View mScrollView;
 
+    private View mMoveTarget;
+
     private DragScroller mDragScroller;
     private int mScrollState = SCROLL_OUTSIDE_ZONE;
     private ScrollRunnable mScrollRunnable = new ScrollRunnable();
@@ -147,7 +143,6 @@
      * Used to create a new DragLayer from XML.
      *
      * @param context The application's context.
-     * @param attrs The attribtues set containing the Workspace's customization values.
      */
     public DragController(Context context) {
         mContext = context;
@@ -159,7 +154,7 @@
      * 
      * @param v The view that is being dragged
      * @param source An object representing where the drag originated
-     * @param info The data associated with the object that is being dragged
+     * @param dragInfo The data associated with the object that is being dragged
      * @param dragAction The drag action: either {@link #DRAG_ACTION_MOVE} or
      *        {@link #DRAG_ACTION_COPY}
      */
@@ -195,7 +190,7 @@
      * @param textureWidth The width of the region inside b to use.
      * @param textureHeight The height of the region inside b to use.
      * @param source An object representing where the drag originated
-     * @param info The data associated with the object that is being dragged
+     * @param dragInfo The data associated with the object that is being dragged
      * @param dragAction The drag action: either {@link #DRAG_ACTION_MOVE} or
      *        {@link #DRAG_ACTION_COPY}
      */
@@ -275,6 +270,7 @@
      *              || super.dispatchKeyEvent(event);
      * </pre>
      */
+    @SuppressWarnings({"UnusedDeclaration"})
     public boolean dispatchKeyEvent(KeyEvent event) {
         return mDragging;
     }
@@ -343,6 +339,17 @@
     }
 
     /**
+     * Sets the view that should handle move events.
+     */
+    void setMoveTarget(View view) {
+        mMoveTarget = view;
+    }    
+
+    public boolean dispatchUnhandledMove(View focused, int direction) {
+        return mMoveTarget != null && mMoveTarget.dispatchUnhandledMove(focused, direction);
+    }
+
+    /**
      * Call this from a drag source view.
      */
     public boolean onTouchEvent(MotionEvent ev) {
@@ -377,7 +384,7 @@
 
             // Drop on someone?
             final int[] coordinates = mCoordinatesTemp;
-            DropTarget dropTarget = findDropTarget((int) screenX, (int) screenY, coordinates);
+            DropTarget dropTarget = findDropTarget(screenX, screenY, coordinates);
             if (dropTarget != null) {
                 if (mLastDropTarget == dropTarget) {
                     dropTarget.onDragOver(mDragSource, coordinates[0], coordinates[1],
diff --git a/src/com/android/launcher2/DragLayer.java b/src/com/android/launcher2/DragLayer.java
index 7ae9891..c683207 100644
--- a/src/com/android/launcher2/DragLayer.java
+++ b/src/com/android/launcher2/DragLayer.java
@@ -18,9 +18,9 @@
 
 import android.content.Context;
 import android.util.AttributeSet;
-import android.util.Log;
 import android.view.MotionEvent;
 import android.view.KeyEvent;
+import android.view.View;
 import android.widget.FrameLayout;
 
 /**
@@ -57,4 +57,9 @@
     public boolean onTouchEvent(MotionEvent ev) {
         return mDragController.onTouchEvent(ev);
     }
+
+    @Override
+    public boolean dispatchUnhandledMove(View focused, int direction) {
+        return mDragController.dispatchUnhandledMove(focused, direction);
+    }
 }
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 45545db..1830521 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -19,7 +19,6 @@
 import android.app.Activity;
 import android.app.AlertDialog;
 import android.app.Dialog;
-import android.app.ISearchManager;
 import android.app.SearchManager;
 import android.app.StatusBarManager;
 import android.app.WallpaperManager;
@@ -46,8 +45,6 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Parcelable;
-import android.os.RemoteException;
-import android.os.ServiceManager;
 import android.os.SystemProperties;
 import android.provider.LiveFolders;
 import android.text.Selection;
@@ -113,9 +110,6 @@
 
     static final String EXTRA_SHORTCUT_DUPLICATE = "duplicate";
 
-    static final String EXTRA_CUSTOM_WIDGET = "custom_widget";
-    static final String SEARCH_WIDGET = "search_widget";
-
     static final int SCREEN_COUNT = 5;
     static final int DEFAULT_SCREEN = 2;
     static final int NUMBER_CELLS_X = 4;
@@ -183,8 +177,6 @@
 
     private SpannableStringBuilder mDefaultKeySsb = null;
 
-    private boolean mIsNewIntent;
-
     private boolean mWorkspaceLoading = true;
 
     private boolean mPaused = true;
@@ -412,21 +404,6 @@
             mModel.startLoader(this, true);
             mRestoring = false;
         }
-
-        // If this was a new intent (i.e., the mIsNewIntent flag got set to true by
-        // onNewIntent), then close the search dialog if needed, because it probably
-        // came from the user pressing 'home' (rather than, for example, pressing 'back').
-        if (mIsNewIntent) {
-            // Post to a handler so that this happens after the search dialog tries to open
-            // itself again.
-            mWorkspace.post(new Runnable() {
-                public void run() {
-                    stopSearch();
-                }
-            });
-        }
-
-        mIsNewIntent = false;
     }
 
     @Override
@@ -554,6 +531,7 @@
         mHandleView = (HandleView) findViewById(R.id.all_apps_button);
         mHandleView.setLauncher(this);
         mHandleView.setOnClickListener(this);
+        mHandleView.setOnLongClickListener(this);
 
         mPreviousView = (ImageView) dragLayer.findViewById(R.id.previous_screen);
         mNextView = (ImageView) dragLayer.findViewById(R.id.next_screen);
@@ -578,6 +556,7 @@
         dragController.setDragScoller(workspace);
         dragController.setDragListener(deleteZone);
         dragController.setScrollView(dragLayer);
+        dragController.setMoveTarget(workspace);
 
         // The order here is bottom to top.
         dragController.addDropTarget(workspace);
@@ -773,15 +752,15 @@
     private static ApplicationInfo infoFromShortcutIntent(Context context, Intent data) {
         Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
         String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
-        Bitmap bitmap = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON);
+        Parcelable bitmap = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_ICON);
 
         Drawable icon = null;
         boolean filtered = false;
         boolean customIcon = false;
         ShortcutIconResource iconResource = null;
 
-        if (bitmap != null) {
-            icon = new FastBitmapDrawable(Utilities.createBitmapThumbnail(bitmap, context));
+        if (bitmap != null && bitmap instanceof Bitmap) {
+            icon = new FastBitmapDrawable(Utilities.createBitmapThumbnail((Bitmap) bitmap, context));
             filtered = true;
             customIcon = true;
         } else {
@@ -845,11 +824,6 @@
             // also will cancel mWaitingForResult.
             closeSystemDialogs();
 
-            // Set this flag so that onResume knows to close the search dialog if it's open,
-            // because this was a new intent (thus a press of 'home' or some such) rather than
-            // for example onResume being called when the user pressed the 'back' button.
-            mIsNewIntent = true;
-
             boolean alreadyOnHome = ((intent.getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT)
                         != Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
             boolean allAppsVisible = isAllAppsVisible();
@@ -953,26 +927,6 @@
 
         closeAllApps(true);
 
-        // Slide the search widget to the top, if it's on the current screen,
-        // otherwise show the search dialog immediately.
-        Search searchWidget = mWorkspace.findSearchWidgetOnCurrentScreen();
-        if (searchWidget == null) {
-            showSearchDialog(initialQuery, selectInitialQuery, appSearchData, globalSearch);
-        } else {
-            searchWidget.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
-            // show the currently typed text in the search widget while sliding
-            searchWidget.setQuery(getTypedText());
-        }
-    }
-
-    /**
-     * Show the search dialog immediately, without changing the search widget.
-     *
-     * @see Activity#startSearch(String, boolean, android.os.Bundle, boolean)
-     */
-    void showSearchDialog(String initialQuery, boolean selectInitialQuery,
-            Bundle appSearchData, boolean globalSearch) {
-
         if (initialQuery == null) {
             // Use any text typed in the launcher as the initial query
             initialQuery = getTypedText();
@@ -985,37 +939,10 @@
 
         final SearchManager searchManager =
                 (SearchManager) getSystemService(Context.SEARCH_SERVICE);
-
-        final Search searchWidget = mWorkspace.findSearchWidgetOnCurrentScreen();
-        if (searchWidget != null) {
-            // This gets called when the user leaves the search dialog to go back to
-            // the Launcher.
-            searchManager.setOnCancelListener(new SearchManager.OnCancelListener() {
-                public void onCancel() {
-                    searchManager.setOnCancelListener(null);
-                    stopSearch();
-                }
-            });
-        }
-
         searchManager.startSearch(initialQuery, selectInitialQuery, getComponentName(),
             appSearchData, globalSearch);
     }
 
-    /**
-     * Cancel search dialog if it is open.
-     */
-    void stopSearch() {
-        // Close search dialog
-        SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
-        searchManager.stopSearch();
-        // Restore search widget to its normal position
-        Search searchWidget = mWorkspace.findSearchWidgetOnCurrentScreen();
-        if (searchWidget != null) {
-            searchWidget.stopSearch(false);
-        }
-    }
-
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
         if (isWorkspaceLocked()) {
@@ -1100,51 +1027,21 @@
     void addAppWidget(Intent data) {
         // TODO: catch bad widget exception when sent
         int appWidgetId = data.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);
+        AppWidgetProviderInfo appWidget = mAppWidgetManager.getAppWidgetInfo(appWidgetId);
 
-        String customWidget = data.getStringExtra(EXTRA_CUSTOM_WIDGET);
-        if (SEARCH_WIDGET.equals(customWidget)) {
-            // We don't need this any more, since this isn't a real app widget.
-            mAppWidgetHost.deleteAppWidgetId(appWidgetId);
-            // add the search widget
-            addSearch();
+        if (appWidget.configure != null) {
+            // Launch over to configure widget, if needed
+            Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
+            intent.setComponent(appWidget.configure);
+            intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
+
+            startActivityForResult(intent, REQUEST_CREATE_APPWIDGET);
         } else {
-            AppWidgetProviderInfo appWidget = mAppWidgetManager.getAppWidgetInfo(appWidgetId);
-
-            if (appWidget.configure != null) {
-                // Launch over to configure widget, if needed
-                Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
-                intent.setComponent(appWidget.configure);
-                intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
-
-                startActivityForResult(intent, REQUEST_CREATE_APPWIDGET);
-            } else {
-                // Otherwise just add it
-                onActivityResult(REQUEST_CREATE_APPWIDGET, Activity.RESULT_OK, data);
-            }
+            // Otherwise just add it
+            onActivityResult(REQUEST_CREATE_APPWIDGET, Activity.RESULT_OK, data);
         }
     }
 
-    void addSearch() {
-        final Widget info = Widget.makeSearch();
-        final CellLayout.CellInfo cellInfo = mAddItemCellInfo;
-
-        final int[] xy = mCellCoordinates;
-        final int spanX = info.spanX;
-        final int spanY = info.spanY;
-
-        if (!findSlot(cellInfo, xy, spanX, spanY)) return;
-
-        LauncherModel.addItemToDatabase(this, info, LauncherSettings.Favorites.CONTAINER_DESKTOP,
-        mWorkspace.getCurrentScreen(), xy[0], xy[1], false);
-
-        final View view = mInflater.inflate(info.layoutResource, null);
-        view.setTag(info);
-        Search search = (Search) view.findViewById(R.id.widget_search);
-        search.setLauncher(this);
-
-        mWorkspace.addInCurrentScreen(view, xy[0], xy[1], info.spanX, spanY);
-    }
-
     void processShortcut(Intent intent, int requestCodeApplication, int requestCodeShortcut) {
         // Handle case where user selected "Applications"
         String applicationName = getResources().getString(R.string.group_applications);
@@ -1486,14 +1383,21 @@
                 if (!isAllAppsVisible()) {
                     mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
                             HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
-                    showPreviousPreview(v);
+                    showPreviews(v);
                 }
                 return true;
             case R.id.next_screen:
                 if (!isAllAppsVisible()) {
                     mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
                             HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
-                    showNextPreview(v);
+                    showPreviews(v);
+                }
+                return true;
+            case R.id.all_apps_button:
+                if (!isAllAppsVisible()) {
+                    mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
+                            HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
+                    showPreviews(v);
                 }
                 return true;
         }
@@ -1556,29 +1460,19 @@
         v.setTag(null);
     }
 
-    private void showPreviousPreview(View anchor) {
-        int current = mWorkspace.getCurrentScreen();
-        if (current <= 0) return;
-
+    private void showPreviews(View anchor) {
         showPreviews(anchor, 0, mWorkspace.getChildCount());
     }
 
-    private void showNextPreview(View anchor) {
-        int current = mWorkspace.getCurrentScreen();
-        if (current >= mWorkspace.getChildCount() - 1) return;
-
-        showPreviews(anchor, 0, mWorkspace.getChildCount());        
-    }
-
     private void showPreviews(final View anchor, int start, int end) {
-        Resources resources = getResources();
+        final Resources resources = getResources();
+        final Workspace workspace = mWorkspace;
 
-        Workspace workspace = mWorkspace;
         CellLayout cell = ((CellLayout) workspace.getChildAt(start));
         
         float max = workspace.getChildCount();
         
-        Rect r = new Rect();
+        final Rect r = new Rect();
         resources.getDrawable(R.drawable.preview_background).getPadding(r);
         int extraW = (int) ((r.left + r.right) * max);
         int extraH = r.top + r.bottom;
@@ -1609,10 +1503,10 @@
             ImageView image = new ImageView(this);
             cell = (CellLayout) workspace.getChildAt(i);
 
-            Bitmap bitmap = Bitmap.createBitmap((int) sWidth, (int) sHeight,
+            final Bitmap bitmap = Bitmap.createBitmap((int) sWidth, (int) sHeight,
                     Bitmap.Config.ARGB_8888);
-            
-            Canvas c = new Canvas(bitmap);
+
+            final Canvas c = new Canvas(bitmap);
             c.scale(scale, scale);
             c.translate(-cell.getLeftPadding(), -cell.getTopPadding());
             cell.dispatchDraw(c);
@@ -1630,8 +1524,8 @@
 
             bitmaps.add(bitmap);            
         }
-        
-        PopupWindow p = new PopupWindow(this);
+
+        final PopupWindow p = new PopupWindow(this);
         p.setContentView(preview);
         p.setWidth((int) (sWidth * count + extraW));
         p.setHeight((int) (sHeight + extraH));
@@ -1675,10 +1569,6 @@
         }
     }
 
-    View getDrawerHandle() {
-        return mHandleView;
-    }
-
     Workspace getWorkspace() {
         return mWorkspace;
     }
@@ -1829,22 +1719,14 @@
         return mAllAppsGrid.isVisible();
     }
 
-    boolean isAllAppsOpaque() {
-        return mAllAppsGrid.isOpaque();
-    }
-
     void showAllApps(boolean animated) {
         mAllAppsGrid.zoom(1.0f, animated);
-        //mWorkspace.hide();
-
-        mWorkspace.startFading(false);
 
         mAllAppsGrid.setFocusable(true);
         mAllAppsGrid.requestFocus();
         
         // TODO: fade these two too
         mDeleteZone.setVisibility(View.GONE);
-        //mHandleView.setVisibility(View.GONE);
     }
 
     /**
@@ -1887,13 +1769,6 @@
             mAllAppsGrid.zoom(0.0f, animated);
             mAllAppsGrid.setFocusable(false);
             mWorkspace.getChildAt(mWorkspace.getCurrentScreen()).requestFocus();
-            mWorkspace.startFading(true);
-
-            // TODO: fade these two too
-            /*
-            mDeleteZone.setVisibility(View.VISIBLE);
-            mHandleView.setVisibility(View.VISIBLE);
-            */
         }
     }
 
@@ -1969,22 +1844,6 @@
 
                     Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK);
                     pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
-                    // add the search widget
-                    ArrayList<AppWidgetProviderInfo> customInfo =
-                            new ArrayList<AppWidgetProviderInfo>();
-                    AppWidgetProviderInfo info = new AppWidgetProviderInfo();
-                    info.provider = new ComponentName(getPackageName(), "XXX.YYY");
-                    info.label = getString(R.string.group_search);
-                    info.icon = R.drawable.ic_search_widget;
-                    customInfo.add(info);
-                    pickIntent.putParcelableArrayListExtra(
-                            AppWidgetManager.EXTRA_CUSTOM_INFO, customInfo);
-                    ArrayList<Bundle> customExtras = new ArrayList<Bundle>();
-                    Bundle b = new Bundle();
-                    b.putString(EXTRA_CUSTOM_WIDGET, SEARCH_WIDGET);
-                    customExtras.add(b);
-                    pickIntent.putParcelableArrayListExtra(
-                            AppWidgetManager.EXTRA_CUSTOM_EXTRAS, customExtras);
                     // start the pick activity
                     startActivityForResult(pickIntent, REQUEST_PICK_APPWIDGET);
                     break;
@@ -2125,19 +1984,6 @@
                     workspace.addInScreen(newLiveFolder, item.screen, item.cellX, item.cellY, 1, 1,
                             false);
                     break;
-                case LauncherSettings.Favorites.ITEM_TYPE_WIDGET_SEARCH:
-                    final int screen = workspace.getCurrentScreen();
-                    final View view = mInflater.inflate(R.layout.widget_search,
-                            (ViewGroup) workspace.getChildAt(screen), false);
-
-                    Search search = (Search) view.findViewById(R.id.widget_search);
-                    search.setLauncher(this);
-
-                    final Widget widget = (Widget) item;
-                    view.setTag(widget);
-
-                    workspace.addWidget(view, widget, false);
-                    break;
             }
         }
 
@@ -2248,7 +2094,7 @@
      */
     public void bindPackageRemoved(String packageName, ArrayList<ApplicationInfo> apps) {
         removeDialog(DIALOG_CREATE_SHORTCUT);
-        mWorkspace.removeShortcutsForPackage(packageName);
+        mWorkspace.removeItemsForPackage(packageName);
         mAllAppsGrid.removeApps(apps);
     }
 
@@ -2258,7 +2104,6 @@
     public void dumpState() {
         Log.d(TAG, "BEGIN launcher2 dump state for launcher " + this);
         Log.d(TAG, "mSavedState=" + mSavedState);
-        Log.d(TAG, "mIsNewIntent=" + mIsNewIntent);
         Log.d(TAG, "mWorkspaceLoading=" + mWorkspaceLoading);
         Log.d(TAG, "mRestoring=" + mRestoring);
         Log.d(TAG, "mWaitingForResult=" + mWaitingForResult);
diff --git a/src/com/android/launcher2/LauncherAppWidgetInfo.java b/src/com/android/launcher2/LauncherAppWidgetInfo.java
index 25db72b..a28973b 100644
--- a/src/com/android/launcher2/LauncherAppWidgetInfo.java
+++ b/src/com/android/launcher2/LauncherAppWidgetInfo.java
@@ -25,7 +25,8 @@
 class LauncherAppWidgetInfo extends ItemInfo {
 
     /**
-     * Identifier for this widget when talking with {@link AppWidgetManager} for updates.
+     * Identifier for this widget when talking with
+     * {@link android.appwidget.AppWidgetManager} for updates.
      */
     int appWidgetId;
     
diff --git a/src/com/android/launcher2/LauncherApplication.java b/src/com/android/launcher2/LauncherApplication.java
index 9b63524..a72e53a 100644
--- a/src/com/android/launcher2/LauncherApplication.java
+++ b/src/com/android/launcher2/LauncherApplication.java
@@ -18,7 +18,6 @@
 
 import android.app.Application;
 import android.content.ContentResolver;
-import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.database.ContentObserver;
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 97fa554..7eb240f 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -16,20 +16,25 @@
 
 package com.android.launcher2;
 
+import android.appwidget.AppWidgetManager;
+import android.appwidget.AppWidgetProviderInfo;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
+import android.content.ContentProviderClient;
 import android.content.ContentResolver;
 import android.content.ContentValues;
 import android.content.Intent;
 import android.content.Context;
 import android.content.pm.ActivityInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.ProviderInfo;
 import android.content.pm.ResolveInfo;
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.net.Uri;
+import android.os.RemoteException;
 import android.util.Log;
 import android.os.Process;
 import android.os.SystemClock;
@@ -602,6 +607,8 @@
                 final Context context = mContext;
                 final ContentResolver contentResolver = context.getContentResolver();
                 final PackageManager manager = context.getPackageManager();
+                final AppWidgetManager widgets = AppWidgetManager.getInstance(context);
+                final boolean isSafeMode = manager.isSafeMode();
 
                 /* TODO
                 if (mLocaleChanged) {
@@ -613,6 +620,8 @@
                 mAppWidgets.clear();
                 mFolders.clear();
 
+                final ArrayList<Long> itemsToRemove = new ArrayList<Long>();
+
                 final Cursor c = contentResolver.query(
                         LauncherSettings.Favorites.CONTENT_URI, null, null, null, null);
 
@@ -651,7 +660,6 @@
 
                     ApplicationInfo info;
                     String intentDescription;
-                    Widget widgetInfo;
                     LauncherAppWidgetInfo appWidgetInfo;
                     int container;
                     long id;
@@ -734,81 +742,82 @@
                                 break;
 
                             case LauncherSettings.Favorites.ITEM_TYPE_LIVE_FOLDER:
-
                                 id = c.getLong(idIndex);
-                                LiveFolderInfo liveFolderInfo = findOrMakeLiveFolder(mFolders, id);
+                                Uri uri = Uri.parse(c.getString(uriIndex));
 
-                                intentDescription = c.getString(intentIndex);
-                                intent = null;
-                                if (intentDescription != null) {
-                                    try {
-                                        intent = Intent.parseUri(intentDescription, 0);
-                                    } catch (URISyntaxException e) {
-                                        // Ignore, a live folder might not have a base intent
+                                // Make sure the live folder exists
+                                final ProviderInfo providerInfo =
+                                        context.getPackageManager().resolveContentProvider(
+                                                uri.getAuthority(), 0);
+
+                                if (providerInfo == null && !isSafeMode) {
+                                    itemsToRemove.add(id);
+                                } else {
+                                    LiveFolderInfo liveFolderInfo = findOrMakeLiveFolder(mFolders, id);
+    
+                                    intentDescription = c.getString(intentIndex);
+                                    intent = null;
+                                    if (intentDescription != null) {
+                                        try {
+                                            intent = Intent.parseUri(intentDescription, 0);
+                                        } catch (URISyntaxException e) {
+                                            // Ignore, a live folder might not have a base intent
+                                        }
                                     }
+    
+                                    liveFolderInfo.title = c.getString(titleIndex);
+                                    liveFolderInfo.id = id;
+                                    liveFolderInfo.uri = uri;
+                                    container = c.getInt(containerIndex);
+                                    liveFolderInfo.container = container;
+                                    liveFolderInfo.screen = c.getInt(screenIndex);
+                                    liveFolderInfo.cellX = c.getInt(cellXIndex);
+                                    liveFolderInfo.cellY = c.getInt(cellYIndex);
+                                    liveFolderInfo.baseIntent = intent;
+                                    liveFolderInfo.displayMode = c.getInt(displayModeIndex);
+    
+                                    loadLiveFolderIcon(context, c, iconTypeIndex, iconPackageIndex,
+                                            iconResourceIndex, liveFolderInfo);
+    
+                                    switch (container) {
+                                        case LauncherSettings.Favorites.CONTAINER_DESKTOP:
+                                            mItems.add(liveFolderInfo);
+                                            break;
+                                    }
+                                    mFolders.put(liveFolderInfo.id, liveFolderInfo);
                                 }
-
-                                liveFolderInfo.title = c.getString(titleIndex);
-                                liveFolderInfo.id = id;
-                                container = c.getInt(containerIndex);
-                                liveFolderInfo.container = container;
-                                liveFolderInfo.screen = c.getInt(screenIndex);
-                                liveFolderInfo.cellX = c.getInt(cellXIndex);
-                                liveFolderInfo.cellY = c.getInt(cellYIndex);
-                                liveFolderInfo.uri = Uri.parse(c.getString(uriIndex));
-                                liveFolderInfo.baseIntent = intent;
-                                liveFolderInfo.displayMode = c.getInt(displayModeIndex);
-
-                                loadLiveFolderIcon(context, c, iconTypeIndex, iconPackageIndex,
-                                        iconResourceIndex, liveFolderInfo);
-
-                                switch (container) {
-                                    case LauncherSettings.Favorites.CONTAINER_DESKTOP:
-                                        mItems.add(liveFolderInfo);
-                                        break;
-                                }
-                                mFolders.put(liveFolderInfo.id, liveFolderInfo);
-                                break;
-
-                            case LauncherSettings.Favorites.ITEM_TYPE_WIDGET_SEARCH:
-                                widgetInfo = Widget.makeSearch();
-
-                                container = c.getInt(containerIndex);
-                                if (container != LauncherSettings.Favorites.CONTAINER_DESKTOP) {
-                                    Log.e(TAG, "Widget found where container "
-                                            + "!= CONTAINER_DESKTOP  ignoring!");
-                                    continue;
-                                }
-
-                                widgetInfo.id = c.getLong(idIndex);
-                                widgetInfo.screen = c.getInt(screenIndex);
-                                widgetInfo.container = container;
-                                widgetInfo.cellX = c.getInt(cellXIndex);
-                                widgetInfo.cellY = c.getInt(cellYIndex);
-
-                                mItems.add(widgetInfo);
                                 break;
 
                             case LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET:
                                 // Read all Launcher-specific widget details
                                 int appWidgetId = c.getInt(appWidgetIdIndex);
-                                appWidgetInfo = new LauncherAppWidgetInfo(appWidgetId);
-                                appWidgetInfo.id = c.getLong(idIndex);
-                                appWidgetInfo.screen = c.getInt(screenIndex);
-                                appWidgetInfo.cellX = c.getInt(cellXIndex);
-                                appWidgetInfo.cellY = c.getInt(cellYIndex);
-                                appWidgetInfo.spanX = c.getInt(spanXIndex);
-                                appWidgetInfo.spanY = c.getInt(spanYIndex);
+                                id = c.getLong(idIndex);
 
-                                container = c.getInt(containerIndex);
-                                if (container != LauncherSettings.Favorites.CONTAINER_DESKTOP) {
-                                    Log.e(TAG, "Widget found where container "
-                                            + "!= CONTAINER_DESKTOP -- ignoring!");
-                                    continue;
+                                final AppWidgetProviderInfo provider =
+                                        widgets.getAppWidgetInfo(appWidgetId);
+                                
+                                if (!isSafeMode && (provider == null || provider.provider == null ||
+                                        provider.provider.getPackageName() == null)) {
+                                    itemsToRemove.add(id);
+                                } else {
+                                    appWidgetInfo = new LauncherAppWidgetInfo(appWidgetId);
+                                    appWidgetInfo.id = id;
+                                    appWidgetInfo.screen = c.getInt(screenIndex);
+                                    appWidgetInfo.cellX = c.getInt(cellXIndex);
+                                    appWidgetInfo.cellY = c.getInt(cellYIndex);
+                                    appWidgetInfo.spanX = c.getInt(spanXIndex);
+                                    appWidgetInfo.spanY = c.getInt(spanYIndex);
+    
+                                    container = c.getInt(containerIndex);
+                                    if (container != LauncherSettings.Favorites.CONTAINER_DESKTOP) {
+                                        Log.e(TAG, "Widget found where container "
+                                                + "!= CONTAINER_DESKTOP -- ignoring!");
+                                        continue;
+                                    }
+                                    appWidgetInfo.container = c.getInt(containerIndex);
+    
+                                    mAppWidgets.add(appWidgetInfo);
                                 }
-                                appWidgetInfo.container = c.getInt(containerIndex);
-
-                                mAppWidgets.add(appWidgetInfo);
                                 break;
                             }
                         } catch (Exception e) {
@@ -818,6 +827,25 @@
                 } finally {
                     c.close();
                 }
+
+                if (itemsToRemove.size() > 0) {
+                    ContentProviderClient client = contentResolver.acquireContentProviderClient(
+                                    LauncherSettings.Favorites.CONTENT_URI);
+                    // Remove dead items
+                    for (long id : itemsToRemove) {
+                        if (DEBUG_LOADERS) {
+                            Log.d(TAG, "Removed id = " + id);
+                        }
+                        // Don't notify content observers
+                        try {
+                            client.delete(LauncherSettings.Favorites.getContentUri(id, false),
+                                    null, null);
+                        } catch (RemoteException e) {
+                            Log.w(TAG, "Could not remove id = " + id);
+                        }
+                    }
+                }
+
                 if (DEBUG_LOADERS) {
                     Log.d(TAG, "loaded workspace in " + (SystemClock.uptimeMillis()-t) + "ms");
                 }
@@ -976,7 +1004,7 @@
             private void bindAllApps() {
                 synchronized (mLock) {
                     final ArrayList<ApplicationInfo> results
-                            = (ArrayList<ApplicationInfo>)mAllAppsList.data.clone();
+                            = (ArrayList<ApplicationInfo>) mAllAppsList.data.clone();
                     // We're adding this now, so clear out this so we don't re-send them.
                     mAllAppsList.added = new ArrayList<ApplicationInfo>();
                     mHandler.post(new Runnable() {
@@ -991,7 +1019,7 @@
 
                             if (DEBUG_LOADERS) {
                                 Log.d(TAG, "bound app " + count + " icons in "
-                                    + (SystemClock.uptimeMillis()-t) + "ms");
+                                    + (SystemClock.uptimeMillis() - t) + "ms");
                             }
                         }
                     });
diff --git a/src/com/android/launcher2/LauncherProvider.java b/src/com/android/launcher2/LauncherProvider.java
index c3ceefd..f03e50c 100644
--- a/src/com/android/launcher2/LauncherProvider.java
+++ b/src/com/android/launcher2/LauncherProvider.java
@@ -16,8 +16,10 @@
 
 package com.android.launcher2;
 
+import android.app.SearchManager;
 import android.appwidget.AppWidgetHost;
 import android.appwidget.AppWidgetManager;
+import android.appwidget.AppWidgetProviderInfo;
 import android.content.ContentProvider;
 import android.content.Context;
 import android.content.ContentValues;
@@ -46,10 +48,11 @@
 import java.io.IOException;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
+import java.util.List;
 
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlPullParser;
-import com.android.internal.util.XmlUtils;
+import com.android.common.XmlUtils;
 import com.android.launcher2.LauncherSettings.Favorites;
 
 public class LauncherProvider extends ContentProvider {
@@ -58,7 +61,7 @@
 
     private static final String DATABASE_NAME = "launcher.db";
     
-    private static final int DATABASE_VERSION = 6;
+    private static final int DATABASE_VERSION = 7;
 
     static final String AUTHORITY = "com.android.launcher2.settings";
     
@@ -382,7 +385,13 @@
                     version = 6;
                 }
             }
-            
+
+            if (version < 7) {
+                // Version 7 gets rid of the special search widget.
+                convertWidgets(db);
+                version = 7;
+            }
+
             if (version != DATABASE_VERSION) {
                 Log.w(TAG, "Destroying all old data.");
                 db.execSQL("DROP TABLE IF EXISTS " + TABLE_FAVORITES);
@@ -459,30 +468,24 @@
 
         /**
          * Upgrade existing clock and photo frame widgets into their new widget
-         * equivalents. This method allocates appWidgetIds, and then hands off to
-         * LauncherAppWidgetBinder to finish the actual binding.
+         * equivalents.
          */
         private void convertWidgets(SQLiteDatabase db) {
+            final AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(mContext);
             final int[] bindSources = new int[] {
                     Favorites.ITEM_TYPE_WIDGET_CLOCK,
                     Favorites.ITEM_TYPE_WIDGET_PHOTO_FRAME,
+                    Favorites.ITEM_TYPE_WIDGET_SEARCH,
             };
-            
-            final ArrayList<ComponentName> bindTargets = new ArrayList<ComponentName>();
-            bindTargets.add(new ComponentName("com.android.alarmclock",
-                    "com.android.alarmclock.AnalogAppWidgetProvider"));
-            bindTargets.add(new ComponentName("com.android.camera",
-                    "com.android.camera.PhotoAppWidgetProvider"));
-            
+
             final String selectWhere = buildOrWhereString(Favorites.ITEM_TYPE, bindSources);
             
             Cursor c = null;
-            boolean allocatedAppWidgets = false;
             
             db.beginTransaction();
             try {
                 // Select and iterate through each matching widget
-                c = db.query(TABLE_FAVORITES, new String[] { Favorites._ID },
+                c = db.query(TABLE_FAVORITES, new String[] { Favorites._ID, Favorites.ITEM_TYPE },
                         selectWhere, null, null, null, null);
                 
                 if (LOGD) Log.d(TAG, "found upgrade cursor count=" + c.getCount());
@@ -490,7 +493,8 @@
                 final ContentValues values = new ContentValues();
                 while (c != null && c.moveToNext()) {
                     long favoriteId = c.getLong(0);
-                    
+                    int favoriteType = c.getInt(1);
+
                     // Allocate and update database with new appWidgetId
                     try {
                         int appWidgetId = mAppWidgetHost.allocateAppWidgetId();
@@ -499,18 +503,35 @@
                             Log.d(TAG, "allocated appWidgetId=" + appWidgetId
                                     + " for favoriteId=" + favoriteId);
                         }
-                        
                         values.clear();
-                        values.put(LauncherSettings.Favorites.APPWIDGET_ID, appWidgetId);
-                        
+                        values.put(Favorites.ITEM_TYPE, Favorites.ITEM_TYPE_APPWIDGET);
+                        values.put(Favorites.APPWIDGET_ID, appWidgetId);
+
                         // Original widgets might not have valid spans when upgrading
-                        values.put(LauncherSettings.Favorites.SPANX, 2);
-                        values.put(LauncherSettings.Favorites.SPANY, 2);
+                        if (favoriteType == Favorites.ITEM_TYPE_WIDGET_SEARCH) {
+                            values.put(LauncherSettings.Favorites.SPANX, 4);
+                            values.put(LauncherSettings.Favorites.SPANY, 1);
+                        } else {
+                            values.put(LauncherSettings.Favorites.SPANX, 2);
+                            values.put(LauncherSettings.Favorites.SPANY, 2);
+                        }
 
                         String updateWhere = Favorites._ID + "=" + favoriteId;
                         db.update(TABLE_FAVORITES, values, updateWhere, null);
-                        
-                        allocatedAppWidgets = true;
+
+                        ComponentName cn = null;
+                        if (favoriteType == Favorites.ITEM_TYPE_WIDGET_CLOCK) {
+                            appWidgetManager.bindAppWidgetId(appWidgetId,
+                                    new ComponentName("com.android.alarmclock",
+                                    "com.android.alarmclock.AnalogAppWidgetProvider"));
+                        } else if (favoriteType == Favorites.ITEM_TYPE_WIDGET_PHOTO_FRAME) {
+                            appWidgetManager.bindAppWidgetId(appWidgetId,
+                                    new ComponentName("com.android.camera",
+                                    "com.android.camera.PhotoAppWidgetProvider"));
+                        } else if (favoriteType == Favorites.ITEM_TYPE_WIDGET_SEARCH) {
+                            appWidgetManager.bindAppWidgetId(appWidgetId,
+                                    getSearchWidgetProvider());
+                        }
                     } catch (RuntimeException ex) {
                         Log.e(TAG, "Problem allocating appWidgetId", ex);
                     }
@@ -525,34 +546,9 @@
                     c.close();
                 }
             }
-            
-            // If any appWidgetIds allocated, then launch over to binder
-            if (allocatedAppWidgets) {
-                launchAppWidgetBinder(bindSources, bindTargets);
-            }
         }
 
         /**
-         * Launch the widget binder that walks through the Launcher database,
-         * binding any matching widgets to the corresponding targets. We can't
-         * bind ourselves because our parent process can't obtain the
-         * BIND_APPWIDGET permission.
-         */
-        private void launchAppWidgetBinder(int[] bindSources, ArrayList<ComponentName> bindTargets) {
-            final Intent intent = new Intent();
-            intent.setComponent(new ComponentName("com.android.settings",
-                    "com.android.settings.LauncherAppWidgetBinder"));
-            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            
-            final Bundle extras = new Bundle();
-            extras.putIntArray(EXTRA_BIND_SOURCES, bindSources);
-            extras.putParcelableArrayList(EXTRA_BIND_TARGETS, bindTargets);
-            intent.putExtras(extras);
-            
-            mContext.startActivity(intent);
-        }
-        
-        /**
          * Loads the default set of favorite packages from an xml file.
          *
          * @param db The database to write the values into
@@ -645,48 +641,41 @@
             return true;
         }
 
-        private boolean addSearchWidget(SQLiteDatabase db, ContentValues values) {
-            // Add a search box
-            values.put(Favorites.ITEM_TYPE, Favorites.ITEM_TYPE_WIDGET_SEARCH);
-            values.put(Favorites.SPANX, 4);
-            values.put(Favorites.SPANY, 1);
-            db.insert(TABLE_FAVORITES, null, values);
+        private ComponentName getSearchWidgetProvider() {
+            SearchManager searchManager =
+                    (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE);
+            ComponentName searchComponent = searchManager.getGlobalSearchActivity();
+            if (searchComponent == null) return null;
+            return getProviderInPackage(searchComponent.getPackageName());
+        }
 
-            return true;
+        /**
+         * Gets an appwidget provider from the given package. If the package contains more than
+         * one appwidget provider, an arbitrary one is returned.
+         */
+        private ComponentName getProviderInPackage(String packageName) {
+            AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(mContext);
+            List<AppWidgetProviderInfo> providers = appWidgetManager.getInstalledProviders();
+            if (providers == null) return null;
+            final int providerCount = providers.size();
+            for (int i = 0; i < providerCount; i++) {
+                ComponentName provider = providers.get(i).provider;
+                if (provider != null && provider.getPackageName().equals(packageName)) {
+                    return provider;
+                }
+            }
+            return null;
+        }
+
+        private boolean addSearchWidget(SQLiteDatabase db, ContentValues values) {
+            ComponentName cn = getSearchWidgetProvider();
+            return addAppWidget(db, values, cn, 4, 1);
         }
 
         private boolean addClockWidget(SQLiteDatabase db, ContentValues values) {
-            final int[] bindSources = new int[] {
-                    Favorites.ITEM_TYPE_WIDGET_CLOCK,
-            };
-
-            final ArrayList<ComponentName> bindTargets = new ArrayList<ComponentName>();
-            bindTargets.add(new ComponentName("com.android.alarmclock",
-                    "com.android.alarmclock.AnalogAppWidgetProvider"));
-
-            boolean allocatedAppWidgets = false;
-            
-            // Try binding to an analog clock widget
-            try {
-                int appWidgetId = mAppWidgetHost.allocateAppWidgetId();
-
-                values.put(Favorites.ITEM_TYPE, Favorites.ITEM_TYPE_WIDGET_CLOCK);
-                values.put(Favorites.SPANX, 2);
-                values.put(Favorites.SPANY, 2);
-                values.put(Favorites.APPWIDGET_ID, appWidgetId);
-                db.insert(TABLE_FAVORITES, null, values);
-
-                allocatedAppWidgets = true;
-            } catch (RuntimeException ex) {
-                Log.e(TAG, "Problem allocating appWidgetId", ex);
-            }
-
-            // If any appWidgetIds allocated, then launch over to binder
-            if (allocatedAppWidgets) {
-                launchAppWidgetBinder(bindSources, bindTargets);
-            }
-
-            return allocatedAppWidgets;
+            ComponentName cn = new ComponentName("com.android.alarmclock",
+                    "com.android.alarmclock.AnalogAppWidgetProvider");
+            return addAppWidget(db, values, cn, 2, 2);
         }
         
         private boolean addAppWidget(SQLiteDatabase db, ContentValues values, TypedArray a) {
@@ -698,7 +687,13 @@
             }
             
             ComponentName cn = new ComponentName(packageName, className);
-            
+            int spanX = a.getInt(R.styleable.Favorite_spanX, 0);
+            int spanY = a.getInt(R.styleable.Favorite_spanY, 0);
+            return addAppWidget(db, values, cn, spanX, spanY);
+        }
+
+        private boolean addAppWidget(SQLiteDatabase db, ContentValues values, ComponentName cn,
+                int spanX, int spanY) {
             boolean allocatedAppWidgets = false;
             final AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(mContext);
 
@@ -706,8 +701,8 @@
                 int appWidgetId = mAppWidgetHost.allocateAppWidgetId();
                 
                 values.put(Favorites.ITEM_TYPE, Favorites.ITEM_TYPE_APPWIDGET);
-                values.put(Favorites.SPANX, a.getString(R.styleable.Favorite_spanX));
-                values.put(Favorites.SPANY, a.getString(R.styleable.Favorite_spanY));
+                values.put(Favorites.SPANX, spanX);
+                values.put(Favorites.SPANY, spanY);
                 values.put(Favorites.APPWIDGET_ID, appWidgetId);
                 db.insert(TABLE_FAVORITES, null, values);
 
diff --git a/src/com/android/launcher2/LauncherSettings.java b/src/com/android/launcher2/LauncherSettings.java
index a438d47..9c685ce 100644
--- a/src/com/android/launcher2/LauncherSettings.java
+++ b/src/com/android/launcher2/LauncherSettings.java
@@ -91,8 +91,7 @@
     }
 
     /**
-     * Favorites. When changing these values, be sure to update
-     * {@link com.android.settings.LauncherAppWidgetBinder} as needed.
+     * Favorites.
      */
     static final class Favorites implements BaseLauncherColumns {
         /**
diff --git a/src/com/android/launcher2/Search.java b/src/com/android/launcher2/Search.java
deleted file mode 100644
index 283042d..0000000
--- a/src/com/android/launcher2/Search.java
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.launcher2;
-
-import android.app.Activity;
-import android.content.ActivityNotFoundException;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.content.res.Configuration;
-import android.graphics.drawable.Drawable;
-import android.os.Bundle;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.View.OnKeyListener;
-import android.view.View.OnLongClickListener;
-import android.view.animation.AccelerateDecelerateInterpolator;
-import android.view.animation.Animation;
-import android.view.animation.Interpolator;
-import android.view.animation.Transformation;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.ImageButton;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-public class Search extends LinearLayout 
-        implements OnClickListener, OnKeyListener, OnLongClickListener {
-
-    // Speed at which the widget slides up/down, in pixels/ms.
-    private static final float ANIMATION_VELOCITY = 1.0f;
-
-    /** The distance in dips between the optical top of the widget and the top if its bounds */
-    private static final float WIDGET_TOP_OFFSET = 9;
-
-    
-    private final String TAG = "Launcher.SearchWidget";
-
-    private Launcher mLauncher;
-
-    private TextView mSearchText;
-    private ImageButton mVoiceButton;
-
-    /** The animation that morphs the search widget to the search dialog. */
-    private Animation mMorphAnimation;
-
-    /** The animation that morphs the search widget back to its normal position. */
-    private Animation mUnmorphAnimation;
-
-    // These four are passed to Launcher.startSearch() when the search widget
-    // has finished morphing. They are instance variables to make it possible to update
-    // them while the widget is morphing.
-    private String mInitialQuery;
-    private boolean mSelectInitialQuery;    
-    private Bundle mAppSearchData;
-    private boolean mGlobalSearch;
-
-    // For voice searching
-    private Intent mVoiceSearchIntent;
-    
-    private int mWidgetTopOffset;
-
-    /**
-     * Used to inflate the Workspace from XML.
-     *
-     * @param context The application's context.
-     * @param attrs The attributes set containing the Workspace's customization values.
-     */
-    public Search(Context context, AttributeSet attrs) {
-        super(context, attrs);
-
-        final float scale = context.getResources().getDisplayMetrics().density;
-        mWidgetTopOffset = Math.round(WIDGET_TOP_OFFSET * scale);
-        
-        Interpolator interpolator = new AccelerateDecelerateInterpolator();
-
-        mMorphAnimation = new ToParentOriginAnimation();
-        // no need to apply transformation before the animation starts,
-        // since the gadget is already in its normal place.
-        mMorphAnimation.setFillBefore(false);
-        // stay in the top position after the animation finishes
-        mMorphAnimation.setFillAfter(true);
-        mMorphAnimation.setInterpolator(interpolator);
-        mMorphAnimation.setAnimationListener(new Animation.AnimationListener() {
-            // The amount of time before the animation ends to show the search dialog.
-            private static final long TIME_BEFORE_ANIMATION_END = 80;
-            
-            // The runnable which we'll pass to our handler to show the search dialog.
-            private final Runnable mShowSearchDialogRunnable = new Runnable() {
-                public void run() {
-                    showSearchDialog();
-                }
-            };
-            
-            public void onAnimationEnd(Animation animation) { }
-            public void onAnimationRepeat(Animation animation) { }
-            public void onAnimationStart(Animation animation) {
-                // Make the search dialog show up ideally *just* as the animation reaches
-                // the top, to aid the illusion that the widget becomes the search dialog.
-                // Otherwise, there is a short delay when the widget reaches the top before
-                // the search dialog shows. We do this roughly 80ms before the animation ends.
-                getHandler().postDelayed(
-                        mShowSearchDialogRunnable,
-                        Math.max(mMorphAnimation.getDuration() - TIME_BEFORE_ANIMATION_END, 0));
-            }
-        });
-
-        mUnmorphAnimation = new FromParentOriginAnimation();
-        // stay in the top position until the animation starts
-        mUnmorphAnimation.setFillBefore(true);
-        // no need to apply transformation after the animation finishes,
-        // since the gadget is now back in its normal place.
-        mUnmorphAnimation.setFillAfter(false);
-        mUnmorphAnimation.setInterpolator(interpolator);
-        mUnmorphAnimation.setAnimationListener(new Animation.AnimationListener(){
-            public void onAnimationEnd(Animation animation) {
-                clearAnimation();
-            }
-            public void onAnimationRepeat(Animation animation) { }
-            public void onAnimationStart(Animation animation) { }
-        });
-        
-        mVoiceSearchIntent = new Intent(android.speech.RecognizerIntent.ACTION_WEB_SEARCH);
-        mVoiceSearchIntent.putExtra(android.speech.RecognizerIntent.EXTRA_LANGUAGE_MODEL,
-                android.speech.RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH);
-    }
-
-    /**
-     * Implements OnClickListener.
-     */
-    public void onClick(View v) {
-        if (v == mVoiceButton) {
-            startVoiceSearch();
-        } else {
-            mLauncher.onSearchRequested();
-        }
-    }
-
-    private void startVoiceSearch() {
-        try {
-            getContext().startActivity(mVoiceSearchIntent);
-        } catch (ActivityNotFoundException ex) {
-            // Should not happen, since we check the availability of
-            // voice search before showing the button. But just in case...
-            Log.w(TAG, "Could not find voice search activity");
-        }
-    }
-
-    /**
-     * Sets the query text. The query field is not editable, instead we forward
-     * the key events to the launcher, which keeps track of the text, 
-     * calls setQuery() to show it, and gives it to the search dialog.
-     */
-    public void setQuery(String query) {
-        mSearchText.setText(query, TextView.BufferType.NORMAL);
-    }
-
-    /**
-     * Morph the search gadget to the search dialog.
-     * See {@link Activity#startSearch()} for the arguments.
-     */
-    public void startSearch(String initialQuery, boolean selectInitialQuery, 
-            Bundle appSearchData, boolean globalSearch) {
-        mInitialQuery = initialQuery;
-        mSelectInitialQuery = selectInitialQuery;
-        mAppSearchData = appSearchData;
-        mGlobalSearch = globalSearch;
-        
-        if (isAtTop()) {
-            showSearchDialog();
-        } else {
-            // Call up the keyboard before we actually call the search dialog so that it
-            // (hopefully) animates in at about the same time as the widget animation, and
-            // so that it becomes available as soon as possible. Only do this if a hard
-            // keyboard is not currently available.
-            if (getContext().getResources().getConfiguration().hardKeyboardHidden ==
-                    Configuration.HARDKEYBOARDHIDDEN_YES) {
-                InputMethodManager inputManager = (InputMethodManager)
-                        getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
-                inputManager.showSoftInputUnchecked(0, null);
-            }
-            
-            // Start the animation, unless it has already started.
-            if (getAnimation() != mMorphAnimation) {
-                mMorphAnimation.setDuration(getAnimationDuration());
-                startAnimation(mMorphAnimation);
-            }
-        }
-    }
-
-    /**
-     * Shows the system search dialog immediately, without any animation.
-     */
-    private void showSearchDialog() {
-        mLauncher.showSearchDialog(
-                mInitialQuery, mSelectInitialQuery, mAppSearchData, mGlobalSearch);
-    }
-
-    /**
-     * Restore the search gadget to its normal position.
-     * 
-     * @param animate Whether to animate the movement of the gadget.
-     */
-    public void stopSearch(boolean animate) {
-        setQuery("");
-        
-        // Only restore if we are not already restored.
-        if (getAnimation() == mMorphAnimation) {
-            if (animate && !isAtTop()) {
-                mUnmorphAnimation.setDuration(getAnimationDuration());
-                startAnimation(mUnmorphAnimation);
-            } else {
-                clearAnimation();
-            }
-        }
-    }
-
-    private boolean isAtTop() {
-        return getWidgetTop() == 0;
-    }
-
-    private int getAnimationDuration() {
-        return (int) (getWidgetTop() / ANIMATION_VELOCITY);
-    }
-
-    /**
-     * Modify clearAnimation() to invalidate the parent. This works around
-     * an issue where the region where the end of the animation placed the view
-     * was not redrawn after clearing the animation.
-     */
-    @Override
-    public void clearAnimation() {
-        Animation animation = getAnimation();
-        if (animation != null) {
-            super.clearAnimation();
-            if (animation.hasEnded() 
-                    && animation.getFillAfter()
-                    && animation.willChangeBounds()) {
-                View parent = (View) getParent();
-                if (parent != null) parent.invalidate();
-            } else {
-                invalidate();
-            }
-        }
-    }
-    
-    public boolean onKey(View v, int keyCode, KeyEvent event) {
-        if (!event.isSystem() && 
-                (keyCode != KeyEvent.KEYCODE_DPAD_UP) &&
-                (keyCode != KeyEvent.KEYCODE_DPAD_DOWN) &&
-                (keyCode != KeyEvent.KEYCODE_DPAD_LEFT) &&
-                (keyCode != KeyEvent.KEYCODE_DPAD_RIGHT) &&
-                (keyCode != KeyEvent.KEYCODE_DPAD_CENTER)) {
-            // Forward key events to Launcher, which will forward text 
-            // to search dialog
-            switch (event.getAction()) {
-                case KeyEvent.ACTION_DOWN:
-                    return mLauncher.onKeyDown(keyCode, event);
-                case KeyEvent.ACTION_MULTIPLE:
-                    return mLauncher.onKeyMultiple(keyCode, event.getRepeatCount(), event);
-                case KeyEvent.ACTION_UP:
-                    return mLauncher.onKeyUp(keyCode, event);
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Implements OnLongClickListener to pass long clicks on child views 
-     * to the widget. This makes it possible to pick up the widget by long
-     * clicking on the text field or a button.
-     */
-    public boolean onLongClick(View v) {
-        return performLongClick();
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-
-        mSearchText = (TextView) findViewById(R.id.search_src_text);
-        mVoiceButton = (ImageButton) findViewById(R.id.search_voice_btn);
-        
-        mSearchText.setOnKeyListener(this);
-
-        mSearchText.setOnClickListener(this);
-        mVoiceButton.setOnClickListener(this);
-        setOnClickListener(this);        
-
-        mSearchText.setOnLongClickListener(this);
-        mVoiceButton.setOnLongClickListener(this);
-
-        // Set the placeholder text to be the Google logo within the search widget.
-        Drawable googlePlaceholder =
-                getContext().getResources().getDrawable(R.drawable.placeholder_google);
-        mSearchText.setCompoundDrawablesWithIntrinsicBounds(googlePlaceholder, null, null, null);
-
-        configureVoiceSearchButton();
-    }
-    
-    @Override
-    public void onDetachedFromWindow() {
-        super.onDetachedFromWindow();
-    }
-
-    /**
-     * If appropriate &amp; available, configure voice search
-     * 
-     * Note:  Because the home screen search widget is always web search, we only check for
-     * getVoiceSearchLaunchWebSearch() modes.  We don't support the alternate form of app-specific
-     * voice search.
-     */
-    private void configureVoiceSearchButton() {
-        // Enable the voice search button if there is an activity that can handle it
-        PackageManager pm = getContext().getPackageManager();
-        ResolveInfo ri = pm.resolveActivity(mVoiceSearchIntent,
-                PackageManager.MATCH_DEFAULT_ONLY);
-        boolean voiceSearchVisible = ri != null;
-
-        // finally, set visible state of voice search button, as appropriate
-        mVoiceButton.setVisibility(voiceSearchVisible ? View.VISIBLE : View.GONE);
-    }
-    
-    /**
-     * Sets the {@link Launcher} that this gadget will call on to display the search dialog. 
-     */
-    public void setLauncher(Launcher launcher) {
-        mLauncher = launcher;
-    }
-        
-    /** 
-     * Moves the view to the top left corner of its parent.
-     */
-    private class ToParentOriginAnimation extends Animation {
-        @Override
-        protected void applyTransformation(float interpolatedTime, Transformation t) {
-            float dx = -getLeft() * interpolatedTime;
-            float dy = -getWidgetTop() * interpolatedTime;
-            t.getMatrix().setTranslate(dx, dy);
-        }
-    }
-
-    /** 
-     * Moves the view from the top left corner of its parent.
-     */
-    private class FromParentOriginAnimation extends Animation {
-        @Override
-        protected void applyTransformation(float interpolatedTime, Transformation t) {
-            float dx = -getLeft() * (1.0f - interpolatedTime);
-            float dy = -getWidgetTop() * (1.0f - interpolatedTime);
-            t.getMatrix().setTranslate(dx, dy);
-        }
-    }
-
-    /**
-     * The widget is centered vertically within it's 4x1 slot. This is accomplished by nesting
-     * the actual widget inside another view. For animation purposes, we care about the top of the
-     * actual widget rather than it's container. This method return the top of the actual widget.
-     */
-    private int getWidgetTop() {
-        return getTop() + getChildAt(0).getTop() + mWidgetTopOffset;
-    }
-}
diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java
index 2dfba43..94e281b 100644
--- a/src/com/android/launcher2/Utilities.java
+++ b/src/com/android/launcher2/Utilities.java
@@ -52,10 +52,6 @@
     private static int sIconTextureWidth = -1;
     private static int sIconTextureHeight = -1;
 
-    private static int sTitleMargin = -1;
-    private static float sBlurRadius = -1;
-    private static Rect sIconTextureRect;
-
     private static final Paint sPaint = new Paint();
     private static final Paint sBlurPaint = new Paint();
     private static final Paint sGlowColorPressedPaint = new Paint();
@@ -179,8 +175,7 @@
      * Returns a bitmap suitable for the all apps view.  The bitmap will be a power
      * of two sized ARGB_8888 bitmap that can be used as a gl texture.
      */
-    static Bitmap createAllAppsBitmap(Drawable icon, String title, BubbleText bubble,
-            Context context) {
+    static Bitmap createAllAppsBitmap(Drawable icon, Context context) {
         synchronized (sCanvas) { // we share the statics :-(
             if (sIconWidth == -1) {
                 initStatics(context);
@@ -222,8 +217,8 @@
             }
 
             // no intrinsic size --> use default size
-            final int textureWidth = sIconTextureWidth;
-            final int textureHeight = sIconTextureHeight;
+            int textureWidth = sIconTextureWidth;
+            int textureHeight = sIconTextureHeight;
 
             final Bitmap bitmap = Bitmap.createBitmap(textureWidth, textureHeight,
                     Bitmap.Config.ARGB_8888);
@@ -231,7 +226,7 @@
             canvas.setBitmap(bitmap);
 
             final int left = (textureWidth-width) / 2;
-            final int top = sIconTextureRect.top;
+            final int top = (textureHeight-height) / 2;
 
             if (false) {
                 // draw a big box for the icon for debugging
@@ -247,34 +242,12 @@
             icon.draw(canvas);
             icon.setBounds(sOldBounds);
 
-            if (title != null) {
-                bubble.drawText(canvas, title);
-            }
-
             return bitmap;
         }
     }
 
-    static Bitmap extractIconFromTexture(Bitmap src, Context context) {
-        synchronized (sCanvas) { // we share the statics :-(
-            if (sIconWidth == -1) {
-                initStatics(context);
-            }
-            final Bitmap bitmap = Bitmap.createBitmap(sIconWidth, sIconHeight,
-                    Bitmap.Config.ARGB_8888);
-            final Canvas canvas = sCanvas;
-            canvas.setBitmap(bitmap);
-
-            Rect r = new Rect(0, 0, sIconWidth, sIconHeight);
-            canvas.drawColor(0, PorterDuff.Mode.CLEAR);
-            canvas.drawBitmap(src, sIconTextureRect, r, sEmptyPaint);
-
-            return bitmap;
-        }
-    }
-
-    static void drawSelectedAllAppsBitmap(Canvas dest, Bitmap destBitmap,
-            int destWidth, int destHeight, boolean pressed, Bitmap src) {
+    static void drawSelectedAllAppsBitmap(Canvas dest, int destWidth, int destHeight,
+            boolean pressed, Bitmap src) {
         synchronized (sCanvas) { // we share the statics :-(
             if (sIconWidth == -1) {
                 // We can't have gotten to here without src being initialized, which
@@ -284,14 +257,12 @@
             }
 
             dest.drawColor(0, PorterDuff.Mode.CLEAR);
-            dest.drawBitmap(src, sIconTextureRect, sIconTextureRect, sEmptyPaint);
 
             int[] xy = new int[2];
-            Bitmap mask = destBitmap.extractAlpha(sBlurPaint, xy);
+            Bitmap mask = src.extractAlpha(sBlurPaint, xy);
 
             float px = (destWidth - src.getWidth()) / 2;
             float py = (destHeight - src.getHeight()) / 2;
-            dest.drawColor(0, PorterDuff.Mode.CLEAR);
             dest.drawBitmap(mask, px + xy[0], py + xy[1],
                     pressed ? sGlowColorPressedPaint : sGlowColorFocusedPaint);
 
@@ -325,13 +296,13 @@
             if (width > 0 && height > 0) {
                 if (width < bitmapWidth || height < bitmapHeight) {
                     final float ratio = (float) bitmapWidth / bitmapHeight;
-        
+
                     if (bitmapWidth > bitmapHeight) {
                         height = (int) (width / ratio);
                     } else if (bitmapHeight > bitmapWidth) {
                         width = (int) (height * ratio);
                     }
-        
+
                     final Bitmap.Config c = (width == sIconWidth && height == sIconHeight) ?
                             bitmap.getConfig() : Bitmap.Config.ARGB_8888;
                     final Bitmap thumb = Bitmap.createBitmap(sIconWidth, sIconHeight, c);
@@ -368,13 +339,7 @@
         final float density = metrics.density;
 
         sIconWidth = sIconHeight = (int) resources.getDimension(android.R.dimen.app_icon_size);
-        sIconTextureWidth = sIconTextureHeight = roundToPow2(sIconWidth);
-
-        sTitleMargin = (int)(1 * density);
-        sBlurRadius = 5 * density;
-        final int left = (sIconTextureWidth-sIconWidth)/2;
-        final int top = (int)(sBlurRadius) + 1;
-        sIconTextureRect = new Rect(left, top, left+sIconWidth, top+sIconHeight);
+        sIconTextureWidth = sIconTextureHeight = sIconWidth + 2;
 
         sBlurPaint.setMaskFilter(new BlurMaskFilter(5 * density, BlurMaskFilter.Blur.NORMAL));
         sGlowColorPressedPaint.setColor(0xffffc300);
@@ -399,65 +364,60 @@
         private int mBitmapHeight;
 
         BubbleText(Context context) {
-            synchronized (sCanvas) { // we share the statics :-(
-                if (sIconWidth == -1) {
-                    initStatics(context);
-                }
-                final Resources resources = context.getResources();
+            final Resources resources = context.getResources();
 
-                final float scale = resources.getDisplayMetrics().density;
+            final float scale = resources.getDisplayMetrics().density;
 
-                final float paddingLeft = 5.0f * scale;
-                final float paddingRight = 5.0f * scale;
-                final float cellWidth = resources.getDimension(R.dimen.workspace_cell_width);
-                final float bubbleWidth = cellWidth - paddingLeft - paddingRight;
-                mBubblePadding = 3.0f * scale;
+            final float paddingLeft = 5.0f * scale;
+            final float paddingRight = 5.0f * scale;
+            final float cellWidth = resources.getDimension(R.dimen.workspace_cell_width);
+            final float bubbleWidth = cellWidth - paddingLeft - paddingRight;
+            mBubblePadding = 3.0f * scale;
 
-                RectF bubbleRect = mBubbleRect;
-                bubbleRect.left = 0;
-                bubbleRect.top = 0;
-                bubbleRect.right = (int)(bubbleWidth+0.5f);
+            RectF bubbleRect = mBubbleRect;
+            bubbleRect.left = 0;
+            bubbleRect.top = 0;
+            bubbleRect.right = (int)(bubbleWidth+0.5f);
 
-                mTextWidth = bubbleWidth - mBubblePadding - mBubblePadding;
+            mTextWidth = bubbleWidth - mBubblePadding - mBubblePadding;
 
-                Paint rectPaint = new Paint();
-                rectPaint.setColor(0xff000000);
-                rectPaint.setAntiAlias(true);
+            Paint rectPaint = new Paint();
+            rectPaint.setColor(0xff000000);
+            rectPaint.setAntiAlias(true);
 
-                TextPaint textPaint = mTextPaint = new TextPaint();
-                textPaint.setTypeface(Typeface.DEFAULT);
-                textPaint.setTextSize(13*scale);
-                //textPaint.setColor(0xff00ff00);
-                textPaint.setColor(0xffffffff);
-                textPaint.setAntiAlias(true);
-                if (TEXT_BURN) {
-                    textPaint.setShadowLayer(8, 0, 0, 0xff000000);
-                }
+            TextPaint textPaint = mTextPaint = new TextPaint();
+            textPaint.setTypeface(Typeface.DEFAULT);
+            textPaint.setTextSize(13*scale);
+            textPaint.setColor(0xffffffff);
+            textPaint.setAntiAlias(true);
+            if (TEXT_BURN) {
+                textPaint.setShadowLayer(8, 0, 0, 0xff000000);
+            }
 
-                final int iconTop = (int)(sBlurRadius) + 1;
-                final int iconBottom = iconTop + sIconHeight;
+            float ascent = -textPaint.ascent();
+            float descent = textPaint.descent();
+            float leading = 0.0f;//(ascent+descent) * 0.1f;
+            mLeading = (int)(leading + 0.5f);
+            mFirstLineY = (int)(leading + ascent + 0.5f);
+            mLineHeight = (int)(leading + ascent + descent + 0.5f);
 
-                float ascent = -textPaint.ascent();
-                float descent = textPaint.descent();
-                float leading = -1.0f;//(ascent+descent) * 0.1f;
-                mLeading = (int)(leading + 0.5f);
-                mFirstLineY = (int)(iconBottom + sTitleMargin + ascent + 0.5f);
-                mLineHeight = (int)(leading + ascent + descent + 0.5f);
+            mBitmapWidth = roundToPow2((int)(mBubbleRect.width() + 0.5f));
+            mBitmapHeight = roundToPow2((int)((MAX_LINES * mLineHeight) + leading + 0.5f));
 
-                mBitmapWidth = roundToPow2((int)(mBubbleRect.width() + 0.5f));
-                mBitmapHeight = roundToPow2((int)((MAX_LINES * mLineHeight) + leading + 0.5f));
+            mBubbleRect.offsetTo((mBitmapWidth-mBubbleRect.width())/2, 0);
 
-                mBubbleRect.offsetTo((mBitmapWidth-mBubbleRect.width())/2, 0);
-
-                if (false) {
-                    Log.d(TAG, "mBitmapWidth=" + mBitmapWidth + " mBitmapHeight="
-                            + mBitmapHeight + " w=" + ((int)(mBubbleRect.width() + 0.5f))
-                            + " h=" + ((int)((MAX_LINES * mLineHeight) + leading + 0.5f)));
-                }
+            if (false) {
+                Log.d(TAG, "mBitmapWidth=" + mBitmapWidth + " mBitmapHeight="
+                        + mBitmapHeight + " w=" + ((int)(mBubbleRect.width() + 0.5f))
+                        + " h=" + ((int)((MAX_LINES * mLineHeight) + leading + 0.5f)));
             }
         }
 
-        void drawText(Canvas c, String text) {
+        /** You own the bitmap after this and you must call recycle on it. */
+        Bitmap createTextBitmap(String text) {
+            Bitmap b = Bitmap.createBitmap(mBitmapWidth, mBitmapHeight, Bitmap.Config.ALPHA_8);
+            Canvas c = new Canvas(b);
+
             StaticLayout layout = new StaticLayout(text, mTextPaint, (int)mTextWidth,
                     Alignment.ALIGN_CENTER, 1, 0, true);
             int lineCount = layout.getLineCount();
@@ -478,6 +438,8 @@
                 c.drawText(text.substring(layout.getLineStart(i), layout.getLineEnd(i)),
                         x, y, mTextPaint);
             }
+
+            return b;
         }
 
         private int height(int lineCount) {
diff --git a/src/com/android/launcher2/Widget.java b/src/com/android/launcher2/Widget.java
deleted file mode 100644
index 348acee..0000000
--- a/src/com/android/launcher2/Widget.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.launcher2;
-
-import android.content.ContentValues;
-import android.graphics.Bitmap;
-
-/**
- * Represents one instance of a Launcher widget, such as search.
- */
-class Widget extends ItemInfo {
-    int layoutResource;
-
-    static Widget makeSearch() {
-        Widget w = new Widget();
-        w.itemType = LauncherSettings.Favorites.ITEM_TYPE_WIDGET_SEARCH;
-        w.spanX = 4;
-        w.spanY = 1;
-        w.layoutResource = R.layout.widget_search;
-        return w;
-    }
-}
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 9e32dd5..9abf562 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -17,19 +17,21 @@
 package com.android.launcher2;
 
 import android.app.WallpaperManager;
+import android.appwidget.AppWidgetManager;
+import android.appwidget.AppWidgetProviderInfo;
 import android.content.Context;
 import android.content.Intent;
 import android.content.ComponentName;
+import android.content.pm.ProviderInfo;
 import android.content.res.TypedArray;
 import android.content.pm.PackageManager;
 import android.graphics.Canvas;
-import android.graphics.RectF;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
+import android.net.Uri;
 import android.os.Parcelable;
 import android.os.Parcel;
 import android.util.AttributeSet;
-import android.util.Log;
 import android.view.MotionEvent;
 import android.view.VelocityTracker;
 import android.view.View;
@@ -103,16 +105,9 @@
     private int mTouchSlop;
     private int mMaximumVelocity;
 
-    final Rect mDrawerBounds = new Rect();
-    final Rect mClipBounds = new Rect();
-    int mDrawerContentHeight;
-    int mDrawerContentWidth;
-
     private Drawable mPreviousIndicator;
     private Drawable mNextIndicator;
 
-    private boolean mFading = true;
-
     /**
      * Used to inflate the Workspace from XML.
      *
@@ -246,27 +241,6 @@
     }
 
     /**
-     * Returns how many screens there are.
-     */
-    int getScreenCount() {
-        return getChildCount();
-    }
-
-    /**
-     * Computes a bounding rectangle for a range of cells
-     *
-     * @param cellX X coordinate of upper left corner expressed as a cell position
-     * @param cellY Y coordinate of upper left corner expressed as a cell position
-     * @param cellHSpan Width in cells
-     * @param cellVSpan Height in cells
-     * @param rect Rectnagle into which to put the results
-     */
-    public void cellToRect(int cellX, int cellY, int cellHSpan, int cellVSpan, RectF rect) {
-        ((CellLayout)getChildAt(mCurrentScreen)).cellToRect(cellX, cellY,
-                cellHSpan, cellVSpan, rect);
-    }
-
-    /**
      * Sets the current screen.
      *
      * @param currentScreen
@@ -362,16 +336,6 @@
         }
     }
 
-    void addWidget(View view, Widget widget) {
-        addInScreen(view, widget.screen, widget.cellX, widget.cellY, widget.spanX,
-                widget.spanY, false);
-    }
-
-    void addWidget(View view, Widget widget, boolean insert) {
-        addInScreen(view, widget.screen, widget.cellX, widget.cellY, widget.spanX,
-                widget.spanY, insert);
-    }
-
     CellLayout.CellInfo findAllVacantCells(boolean[] occupied) {
         CellLayout group = (CellLayout) getChildAt(mCurrentScreen);
         if (group != null) {
@@ -386,56 +350,6 @@
             mVacantCache = null;
         }
     }
-    
-    /**
-     * Returns the coordinate of a vacant cell for the current screen.
-     */
-    boolean getVacantCell(int[] vacant, int spanX, int spanY) {
-        CellLayout group = (CellLayout) getChildAt(mCurrentScreen);
-        if (group != null) {
-            return group.getVacantCell(vacant, spanX, spanY);
-        }
-        return false;
-    }
-
-    /**
-     * Adds the specified child in the current screen. The position and dimension of
-     * the child are defined by x, y, spanX and spanY.
-     *
-     * @param child The child to add in one of the workspace's screens.
-     * @param spanX The number of cells spanned horizontally by the child.
-     * @param spanY The number of cells spanned vertically by the child.
-     */
-    void fitInCurrentScreen(View child, int spanX, int spanY) {
-        fitInScreen(child, mCurrentScreen, spanX, spanY);
-    }
-
-    /**
-     * Adds the specified child in the specified screen. The position and dimension of
-     * the child are defined by x, y, spanX and spanY.
-     *
-     * @param child The child to add in one of the workspace's screens.
-     * @param screen The screen in which to add the child.
-     * @param spanX The number of cells spanned horizontally by the child.
-     * @param spanY The number of cells spanned vertically by the child.
-     */
-    void fitInScreen(View child, int screen, int spanX, int spanY) {
-        if (screen < 0 || screen >= getChildCount()) {
-            throw new IllegalStateException("The screen must be >= 0 and < " + getChildCount());
-        }
-
-        final CellLayout group = (CellLayout) getChildAt(screen);
-        boolean vacant = group.getVacantCell(mTempCell, spanX, spanY);
-        if (vacant) {
-            group.addView(child,
-                    new CellLayout.LayoutParams(mTempCell[0], mTempCell[1], spanX, spanY));
-            child.setHapticFeedbackEnabled(false);
-            child.setOnLongClickListener(mLongClickListener);
-            if (child instanceof DropTarget) {
-                mDragController.addDropTarget((DropTarget)child);
-            }
-        }
-    }
 
     /**
      * Registers the specified listener on each screen contained in this workspace.
@@ -477,60 +391,17 @@
         }
     }
 
-    public void startFading(boolean dest) {
-        mFading = dest;
-        invalidate();
-    }
-
     @Override
     protected void dispatchDraw(Canvas canvas) {
-        /*
-        final boolean allAppsOpaque = mLauncher.isAllAppsOpaque();
-        if (mFading == allAppsOpaque) {
-            invalidate();
-        } else {
-            mFading = !allAppsOpaque;
-        }
-        if (allAppsOpaque) {
-            // If the launcher is up, draw black.
-            canvas.drawARGB(0xff, 0, 0, 0);
-            return;
-        }
-        */
-
         boolean restore = false;
         int restoreCount = 0;
 
-        // For the fade.  If view gets setAlpha(), use that instead.
-        float scale = mScale;
-        if (scale < 0.999f) {
-            int sx = mScrollX;
-
-            int alpha = (scale < 0.5f) ? (int)(255 * 2 * scale) : 255;
-
-            restoreCount = canvas.saveLayerAlpha(sx, 0, sx+getWidth(), getHeight(), alpha,
-                    Canvas.HAS_ALPHA_LAYER_SAVE_FLAG | Canvas.CLIP_TO_LAYER_SAVE_FLAG);
-            restore = true;
-
-            if (scale < 0.999f) {
-                int w = getWidth();
-                w += 2 * mCurrentScreen * w;
-                int dx = w/2;
-                int h = getHeight();
-                int dy = (h/2) - (h/4);
-                canvas.translate(dx, dy);
-                canvas.scale(scale, scale);
-                canvas.translate(-dx, -dy);
-            }
-        }
-
         // ViewGroup.dispatchDraw() supports many features we don't need:
         // clip to padding, layout animation, animation listener, disappearing
         // children, etc. The following implementation attempts to fast-track
         // the drawing dispatch by drawing only what we know needs to be drawn.
 
-        boolean fastDraw = mTouchState != TOUCH_STATE_SCROLLING && mNextScreen == INVALID_SCREEN
-                && scale > 0.999f;
+        boolean fastDraw = mTouchState != TOUCH_STATE_SCROLLING && mNextScreen == INVALID_SCREEN;
         // If we are not scrolling or flinging, draw only the current screen
         if (fastDraw) {
             drawChild(canvas, getChildAt(mCurrentScreen), getDrawingTime());
@@ -555,12 +426,6 @@
         }
     }
 
-    private float mScale = 1.0f;
-    public void setScale(float scale) {
-        mScale = scale;
-        invalidate();
-    }
-
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
         mDragController.setWindowToken(getWindowToken());
@@ -970,6 +835,8 @@
         final int delta = newX - mScrollX;
         final int duration = screenDelta * 300;
         awakenScrollBars(duration);
+
+        if (!mScroller.isFinished()) mScroller.abortAnimation();
         mScroller.startScroll(mScrollX, 0, delta, 0, duration);
         invalidate();
     }
@@ -978,8 +845,7 @@
         View child = cellInfo.cell;
         
         // Make sure the drag was started by a long press as opposed to a long click.
-        // Note that Search takes focus when clicked rather than entering touch mode
-        if (!child.isInTouchMode() && !(child instanceof Search)) {
+        if (!child.isInTouchMode()) {
             return;
         }
         
@@ -1215,16 +1081,19 @@
 
     public void scrollLeft() {
         clearVacantCache();
-        if (mNextScreen == INVALID_SCREEN && mCurrentScreen > 0 && mScroller.isFinished()) {
-            snapToScreen(mCurrentScreen - 1);
+        if (mScroller.isFinished()) {
+            if (mCurrentScreen > 0) snapToScreen(mCurrentScreen - 1);
+        } else {
+            if (mNextScreen > 0) snapToScreen(mNextScreen - 1);            
         }
     }
 
     public void scrollRight() {
         clearVacantCache();
-        if (mNextScreen == INVALID_SCREEN && mCurrentScreen < getChildCount() -1 &&
-                mScroller.isFinished()) {
-            snapToScreen(mCurrentScreen + 1);
+        if (mScroller.isFinished()) {
+            if (mCurrentScreen < getChildCount() -1) snapToScreen(mCurrentScreen + 1);
+        } else {
+            if (mNextScreen < getChildCount() -1) snapToScreen(mNextScreen + 1);            
         }
     }
 
@@ -1242,29 +1111,6 @@
         return result;
     }
 
-    /**
-     * Find a search widget on the given screen
-     */
-    private Search findSearchWidget(CellLayout screen) {
-        final int count = screen.getChildCount();
-        for (int i = 0; i < count; i++) {
-            View v = screen.getChildAt(i);
-            if (v instanceof Search) {
-                return (Search) v;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Gets the first search widget on the current screen, if there is one.
-     * Returns <code>null</code> otherwise.
-     */
-    public Search findSearchWidgetOnCurrentScreen() {
-        CellLayout currentScreen = (CellLayout)getChildAt(mCurrentScreen);
-        return findSearchWidget(currentScreen);
-    }
-
     public Folder getFolderForTag(Object tag) {
         int screenCount = getChildCount();
         for (int screen = 0; screen < screenCount; screen++) {
@@ -1314,74 +1160,106 @@
         mAllowLongPress = allowLongPress;
     }
 
-    void removeShortcutsForPackage(String packageName) {
-        final ArrayList<View> childrenToRemove = new ArrayList<View>();
+    void removeItemsForPackage(final String packageName) {
         final int count = getChildCount();
+        final PackageManager manager = getContext().getPackageManager();
+        final AppWidgetManager widgets = AppWidgetManager.getInstance(getContext());
 
         for (int i = 0; i < count; i++) {
             final CellLayout layout = (CellLayout) getChildAt(i);
-            int childCount = layout.getChildCount();
 
-            childrenToRemove.clear();
+            // Avoid ANRs by treating each screen separately
+            post(new Runnable() {
+                public void run() {
+                    final ArrayList<View> childrenToRemove = new ArrayList<View>();
+                    childrenToRemove.clear();
+        
+                    int childCount = layout.getChildCount();
+                    for (int j = 0; j < childCount; j++) {
+                        final View view = layout.getChildAt(j);
+                        Object tag = view.getTag();
+        
+                        if (tag instanceof ApplicationInfo) {
+                            final ApplicationInfo info = (ApplicationInfo) tag;
+                            // We need to check for ACTION_MAIN otherwise getComponent() might
+                            // return null for some shortcuts (for instance, for shortcuts to
+                            // web pages.)
+                            final Intent intent = info.intent;
+                            final ComponentName name = intent.getComponent();
+        
+                            if (Intent.ACTION_MAIN.equals(intent.getAction()) &&
+                                    name != null && packageName.equals(name.getPackageName())) {
+                                // TODO: This should probably be done on a worker thread
+                                LauncherModel.deleteItemFromDatabase(mLauncher, info);
+                                childrenToRemove.add(view);
+                            }
+                        } else if (tag instanceof UserFolderInfo) {
+                            final UserFolderInfo info = (UserFolderInfo) tag;
+                            final ArrayList<ApplicationInfo> contents = info.contents;
+                            final ArrayList<ApplicationInfo> toRemove =
+                                    new ArrayList<ApplicationInfo>(1);
+                            final int contentsCount = contents.size();
+                            boolean removedFromFolder = false;
+        
+                            for (int k = 0; k < contentsCount; k++) {
+                                final ApplicationInfo appInfo = contents.get(k);
+                                final Intent intent = appInfo.intent;
+                                final ComponentName name = intent.getComponent();
+        
+                                if (Intent.ACTION_MAIN.equals(intent.getAction()) &&
+                                        name != null && packageName.equals(name.getPackageName())) {
+                                    toRemove.add(appInfo);
+                                    // TODO: This should probably be done on a worker thread
+                                    LauncherModel.deleteItemFromDatabase(mLauncher, appInfo);
+                                    removedFromFolder = true;
+                                }
+                            }
+        
+                            contents.removeAll(toRemove);
+                            if (removedFromFolder) {
+                                final Folder folder = getOpenFolder();
+                                if (folder != null) folder.notifyDataSetChanged();
+                            }
+                        } else if (tag instanceof LiveFolderInfo) {
+                            final LiveFolderInfo info = (LiveFolderInfo) tag;
+                            final Uri uri = info.uri;
+                            final ProviderInfo providerInfo = manager.resolveContentProvider(
+                                    uri.getAuthority(), 0);
 
-            for (int j = 0; j < childCount; j++) {
-                final View view = layout.getChildAt(j);
-                Object tag = view.getTag();
-
-                if (tag instanceof ApplicationInfo) {
-                    final ApplicationInfo info = (ApplicationInfo) tag;
-                    // We need to check for ACTION_MAIN otherwise getComponent() might
-                    // return null for some shortcuts (for instance, for shortcuts to
-                    // web pages.)
-                    final Intent intent = info.intent;
-                    final ComponentName name = intent.getComponent();
-
-                    if (Intent.ACTION_MAIN.equals(intent.getAction()) &&
-                            name != null && packageName.equals(name.getPackageName())) {
-                        LauncherModel.deleteItemFromDatabase(mLauncher, info);
-                        childrenToRemove.add(view);
-                    }
-                } else if (tag instanceof UserFolderInfo) {
-                    final UserFolderInfo info = (UserFolderInfo) tag;
-                    final ArrayList<ApplicationInfo> contents = info.contents;
-                    final ArrayList<ApplicationInfo> toRemove = new ArrayList<ApplicationInfo>(1);
-                    final int contentsCount = contents.size();
-                    boolean removedFromFolder = false;
-
-                    for (int k = 0; k < contentsCount; k++) {
-                        final ApplicationInfo appInfo = contents.get(k);
-                        final Intent intent = appInfo.intent;
-                        final ComponentName name = intent.getComponent();
-
-                        if (Intent.ACTION_MAIN.equals(intent.getAction()) &&
-                                name != null && packageName.equals(name.getPackageName())) {
-                            toRemove.add(appInfo);
-                            LauncherModel.deleteItemFromDatabase(mLauncher, appInfo);
-                            removedFromFolder = true;
+                            if (providerInfo == null ||
+                                    packageName.equals(providerInfo.packageName)) {
+                                // TODO: This should probably be done on a worker thread
+                                LauncherModel.deleteItemFromDatabase(mLauncher, info);
+                                childrenToRemove.add(view);                        
+                            }
+                        } else if (tag instanceof LauncherAppWidgetInfo) {
+                            final LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) tag;
+                            final AppWidgetProviderInfo provider =
+                                    widgets.getAppWidgetInfo(info.appWidgetId);
+                            if (provider == null ||
+                                    packageName.equals(provider.provider.getPackageName())) {
+                                // TODO: This should probably be done on a worker thread
+                                LauncherModel.deleteItemFromDatabase(mLauncher, info);
+                                childrenToRemove.add(view);                                
+                            }
                         }
                     }
-
-                    contents.removeAll(toRemove);
-                    if (removedFromFolder) {
-                        final Folder folder = getOpenFolder();
-                        if (folder != null) folder.notifyDataSetChanged();
+        
+                    childCount = childrenToRemove.size();
+                    for (int j = 0; j < childCount; j++) {
+                        View child = childrenToRemove.get(j);
+                        layout.removeViewInLayout(child);
+                        if (child instanceof DropTarget) {
+                            mDragController.removeDropTarget((DropTarget)child);
+                        }
+                    }
+        
+                    if (childCount > 0) {
+                        layout.requestLayout();
+                        layout.invalidate();
                     }
                 }
-            }
-
-            childCount = childrenToRemove.size();
-            for (int j = 0; j < childCount; j++) {
-                View child = childrenToRemove.get(j);
-                layout.removeViewInLayout(child);
-                if (child instanceof DropTarget) {
-                    mDragController.removeDropTarget((DropTarget)child);
-                }
-            }
-
-            if (childCount > 0) {
-                layout.requestLayout();
-                layout.invalidate();
-            }
+            });
         }
     }
 
@@ -1465,11 +1343,4 @@
             }
         };
     }
-
-    void show() {
-        setVisibility(VISIBLE);
-    }
-
-    void hide() {
-    }
 }
