Merge change I7df54f9d into eclair

* changes:
  Clean up name of static wallpapers.
diff --git a/res/drawable-hdpi/wallpaper_bluedotgrid.jpg b/res/drawable-hdpi/wallpaper_bluedotgrid.jpg
index 2fd28f9..468edfe 100644
--- a/res/drawable-hdpi/wallpaper_bluedotgrid.jpg
+++ b/res/drawable-hdpi/wallpaper_bluedotgrid.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_bluedotgrid_small.jpg b/res/drawable-hdpi/wallpaper_bluedotgrid_small.jpg
index f5244ce..1ff9568 100644
--- a/res/drawable-hdpi/wallpaper_bluedotgrid_small.jpg
+++ b/res/drawable-hdpi/wallpaper_bluedotgrid_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_brown.jpg b/res/drawable-hdpi/wallpaper_brown.jpg
index a76ddd2..9b7ef20 100644
--- a/res/drawable-hdpi/wallpaper_brown.jpg
+++ b/res/drawable-hdpi/wallpaper_brown.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_brown_small.jpg b/res/drawable-hdpi/wallpaper_brown_small.jpg
index 2734ead..e5b417e 100644
--- a/res/drawable-hdpi/wallpaper_brown_small.jpg
+++ b/res/drawable-hdpi/wallpaper_brown_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_canyon.jpg b/res/drawable-hdpi/wallpaper_canyon.jpg
index e3e4ffd..1b129fd 100644
--- a/res/drawable-hdpi/wallpaper_canyon.jpg
+++ b/res/drawable-hdpi/wallpaper_canyon.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_canyon_small.jpg b/res/drawable-hdpi/wallpaper_canyon_small.jpg
index c0c7c9d..fd4d72f 100644
--- a/res/drawable-hdpi/wallpaper_canyon_small.jpg
+++ b/res/drawable-hdpi/wallpaper_canyon_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_cloud_small.jpg b/res/drawable-hdpi/wallpaper_cloud_small.jpg
index 3487c0c..0e4c14c 100644
--- a/res/drawable-hdpi/wallpaper_cloud_small.jpg
+++ b/res/drawable-hdpi/wallpaper_cloud_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_desert.jpg b/res/drawable-hdpi/wallpaper_desert.jpg
index 0213f6d..47daa79 100644
--- a/res/drawable-hdpi/wallpaper_desert.jpg
+++ b/res/drawable-hdpi/wallpaper_desert.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_desert_small.jpg b/res/drawable-hdpi/wallpaper_desert_small.jpg
index 5b69315..9252d36 100644
--- a/res/drawable-hdpi/wallpaper_desert_small.jpg
+++ b/res/drawable-hdpi/wallpaper_desert_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_despair.jpg b/res/drawable-hdpi/wallpaper_despair.jpg
index 49933c1..57e8235 100644
--- a/res/drawable-hdpi/wallpaper_despair.jpg
+++ b/res/drawable-hdpi/wallpaper_despair.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_despair_small.jpg b/res/drawable-hdpi/wallpaper_despair_small.jpg
index bae448d..fc8e3c6 100644
--- a/res/drawable-hdpi/wallpaper_despair_small.jpg
+++ b/res/drawable-hdpi/wallpaper_despair_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_electric.jpg b/res/drawable-hdpi/wallpaper_electric.jpg
index e5afe4c..f7800af 100644
--- a/res/drawable-hdpi/wallpaper_electric.jpg
+++ b/res/drawable-hdpi/wallpaper_electric.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_electric_small.jpg b/res/drawable-hdpi/wallpaper_electric_small.jpg
index c173f7e..66dd573 100644
--- a/res/drawable-hdpi/wallpaper_electric_small.jpg
+++ b/res/drawable-hdpi/wallpaper_electric_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_field.jpg b/res/drawable-hdpi/wallpaper_field.jpg
index 1163b58..5bab9b5 100644
--- a/res/drawable-hdpi/wallpaper_field.jpg
+++ b/res/drawable-hdpi/wallpaper_field.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_field_small.jpg b/res/drawable-hdpi/wallpaper_field_small.jpg
index c63afa4..20d9a48 100644
--- a/res/drawable-hdpi/wallpaper_field_small.jpg
+++ b/res/drawable-hdpi/wallpaper_field_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_galaxy.jpg b/res/drawable-hdpi/wallpaper_galaxy.jpg
index a40ce66..de0f3ff 100644
--- a/res/drawable-hdpi/wallpaper_galaxy.jpg
+++ b/res/drawable-hdpi/wallpaper_galaxy.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_galaxy_small.jpg b/res/drawable-hdpi/wallpaper_galaxy_small.jpg
index d016f12..69d48a2 100644
--- a/res/drawable-hdpi/wallpaper_galaxy_small.jpg
+++ b/res/drawable-hdpi/wallpaper_galaxy_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_goldengate.jpg b/res/drawable-hdpi/wallpaper_goldengate.jpg
index f168450..2271091 100644
--- a/res/drawable-hdpi/wallpaper_goldengate.jpg
+++ b/res/drawable-hdpi/wallpaper_goldengate.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_goldengate_small.jpg b/res/drawable-hdpi/wallpaper_goldengate_small.jpg
index 0353b49..e9aca1e 100644
--- a/res/drawable-hdpi/wallpaper_goldengate_small.jpg
+++ b/res/drawable-hdpi/wallpaper_goldengate_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_grass.jpg b/res/drawable-hdpi/wallpaper_grass.jpg
index 63adc5b..e9dc541 100644
--- a/res/drawable-hdpi/wallpaper_grass.jpg
+++ b/res/drawable-hdpi/wallpaper_grass.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_grass_night.jpg b/res/drawable-hdpi/wallpaper_grass_night.jpg
index 153dae9..b9c74c9 100644
--- a/res/drawable-hdpi/wallpaper_grass_night.jpg
+++ b/res/drawable-hdpi/wallpaper_grass_night.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_grass_night_small.jpg b/res/drawable-hdpi/wallpaper_grass_night_small.jpg
index cc34949..353eb18 100644
--- a/res/drawable-hdpi/wallpaper_grass_night_small.jpg
+++ b/res/drawable-hdpi/wallpaper_grass_night_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_grass_small.jpg b/res/drawable-hdpi/wallpaper_grass_small.jpg
index ee98370..dc45738 100644
--- a/res/drawable-hdpi/wallpaper_grass_small.jpg
+++ b/res/drawable-hdpi/wallpaper_grass_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_gray.jpg b/res/drawable-hdpi/wallpaper_gray.jpg
index 6ccbaca..913f053 100644
--- a/res/drawable-hdpi/wallpaper_gray.jpg
+++ b/res/drawable-hdpi/wallpaper_gray.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_gray_small.jpg b/res/drawable-hdpi/wallpaper_gray_small.jpg
index 42efeb0..d083a74 100644
--- a/res/drawable-hdpi/wallpaper_gray_small.jpg
+++ b/res/drawable-hdpi/wallpaper_gray_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_greengray.jpg b/res/drawable-hdpi/wallpaper_greengray.jpg
index 7bb2510..1f3c86c 100644
--- a/res/drawable-hdpi/wallpaper_greengray.jpg
+++ b/res/drawable-hdpi/wallpaper_greengray.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_greengray_small.jpg b/res/drawable-hdpi/wallpaper_greengray_small.jpg
index e43a053..ebf7066 100644
--- a/res/drawable-hdpi/wallpaper_greengray_small.jpg
+++ b/res/drawable-hdpi/wallpaper_greengray_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_hazybluedots.jpg b/res/drawable-hdpi/wallpaper_hazybluedots.jpg
index 40e1637..fe6aeb4 100644
--- a/res/drawable-hdpi/wallpaper_hazybluedots.jpg
+++ b/res/drawable-hdpi/wallpaper_hazybluedots.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_hazybluedots_small.jpg b/res/drawable-hdpi/wallpaper_hazybluedots_small.jpg
index 7ac0932..c645dea 100644
--- a/res/drawable-hdpi/wallpaper_hazybluedots_small.jpg
+++ b/res/drawable-hdpi/wallpaper_hazybluedots_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_lightgrad.jpg b/res/drawable-hdpi/wallpaper_lightgrad.jpg
index b11f253..35a45fa 100644
--- a/res/drawable-hdpi/wallpaper_lightgrad.jpg
+++ b/res/drawable-hdpi/wallpaper_lightgrad.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_lightgrad_small.jpg b/res/drawable-hdpi/wallpaper_lightgrad_small.jpg
index 4e53bf7..f909da7 100644
--- a/res/drawable-hdpi/wallpaper_lightgrad_small.jpg
+++ b/res/drawable-hdpi/wallpaper_lightgrad_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_monumentvalley.jpg b/res/drawable-hdpi/wallpaper_monumentvalley.jpg
index a88c9c5..1bb5f2c 100644
--- a/res/drawable-hdpi/wallpaper_monumentvalley.jpg
+++ b/res/drawable-hdpi/wallpaper_monumentvalley.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_monumentvalley_small.jpg b/res/drawable-hdpi/wallpaper_monumentvalley_small.jpg
index f3560ff..9ea3309 100644
--- a/res/drawable-hdpi/wallpaper_monumentvalley_small.jpg
+++ b/res/drawable-hdpi/wallpaper_monumentvalley_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_nexuspattern.jpg b/res/drawable-hdpi/wallpaper_nexuspattern.jpg
index 2a1580c4..212a7b1 100644
--- a/res/drawable-hdpi/wallpaper_nexuspattern.jpg
+++ b/res/drawable-hdpi/wallpaper_nexuspattern.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_nexuspattern_small.jpg b/res/drawable-hdpi/wallpaper_nexuspattern_small.jpg
index 1aa9998..8e474a5 100644
--- a/res/drawable-hdpi/wallpaper_nexuspattern_small.jpg
+++ b/res/drawable-hdpi/wallpaper_nexuspattern_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_nexusrain.jpg b/res/drawable-hdpi/wallpaper_nexusrain.jpg
index c465d4e..46c2971 100644
--- a/res/drawable-hdpi/wallpaper_nexusrain.jpg
+++ b/res/drawable-hdpi/wallpaper_nexusrain.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_nexusrain_small.jpg b/res/drawable-hdpi/wallpaper_nexusrain_small.jpg
index 9775a11..a239339 100644
--- a/res/drawable-hdpi/wallpaper_nexusrain_small.jpg
+++ b/res/drawable-hdpi/wallpaper_nexusrain_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_nexuswallpaper1_small.jpg b/res/drawable-hdpi/wallpaper_nexuswallpaper1_small.jpg
index abc0016..70882bb 100644
--- a/res/drawable-hdpi/wallpaper_nexuswallpaper1_small.jpg
+++ b/res/drawable-hdpi/wallpaper_nexuswallpaper1_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_pcut.jpg b/res/drawable-hdpi/wallpaper_pcut.jpg
index c2e8ba1..bb9914d 100644
--- a/res/drawable-hdpi/wallpaper_pcut.jpg
+++ b/res/drawable-hdpi/wallpaper_pcut.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_pcut_small.jpg b/res/drawable-hdpi/wallpaper_pcut_small.jpg
index e520ab0..bd19775 100644
--- a/res/drawable-hdpi/wallpaper_pcut_small.jpg
+++ b/res/drawable-hdpi/wallpaper_pcut_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_ropelights.jpg b/res/drawable-hdpi/wallpaper_ropelights.jpg
index 258cb97..ca7862f 100644
--- a/res/drawable-hdpi/wallpaper_ropelights.jpg
+++ b/res/drawable-hdpi/wallpaper_ropelights.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_ropelights_small.jpg b/res/drawable-hdpi/wallpaper_ropelights_small.jpg
index 9ea969c..ac6fb29 100644
--- a/res/drawable-hdpi/wallpaper_ropelights_small.jpg
+++ b/res/drawable-hdpi/wallpaper_ropelights_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_tree.jpg b/res/drawable-hdpi/wallpaper_tree.jpg
index 07e546c..f998bea 100644
--- a/res/drawable-hdpi/wallpaper_tree.jpg
+++ b/res/drawable-hdpi/wallpaper_tree.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_tree_small.jpg b/res/drawable-hdpi/wallpaper_tree_small.jpg
index b5ba0e1..425305a 100644
--- a/res/drawable-hdpi/wallpaper_tree_small.jpg
+++ b/res/drawable-hdpi/wallpaper_tree_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_x67.jpg b/res/drawable-hdpi/wallpaper_x67.jpg
index 7871b1d..400aa27 100644
--- a/res/drawable-hdpi/wallpaper_x67.jpg
+++ b/res/drawable-hdpi/wallpaper_x67.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_x67_small.jpg b/res/drawable-hdpi/wallpaper_x67_small.jpg
index ffe3ac5..10e0faa 100644
--- a/res/drawable-hdpi/wallpaper_x67_small.jpg
+++ b/res/drawable-hdpi/wallpaper_x67_small.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_zanzibar.jpg b/res/drawable-hdpi/wallpaper_zanzibar.jpg
index cce6726..9218895 100644
--- a/res/drawable-hdpi/wallpaper_zanzibar.jpg
+++ b/res/drawable-hdpi/wallpaper_zanzibar.jpg
Binary files differ
diff --git a/res/drawable-hdpi/wallpaper_zanzibar_small.jpg b/res/drawable-hdpi/wallpaper_zanzibar_small.jpg
index f32c7c7..affdc8c 100644
--- a/res/drawable-hdpi/wallpaper_zanzibar_small.jpg
+++ b/res/drawable-hdpi/wallpaper_zanzibar_small.jpg
Binary files differ
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index c065777..a557f67 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -46,7 +46,7 @@
     <string name="title_select_shortcut" msgid="2858897527672831763">"Sélectionner un raccourci"</string>
     <string name="title_select_live_folder" msgid="3753447798805166749">"Sélectionner le dossier"</string>
     <string name="all_apps_button_label" msgid="3953036962111614813">"Toutes les applications"</string>
-    <string name="all_apps_home_button_label" msgid="1022222300329398558">"Domicile"</string>
+    <string name="all_apps_home_button_label" msgid="1022222300329398558">"Page d\'accueil"</string>
     <string name="menu_add" msgid="3065046628354640854">"Ajouter"</string>
     <string name="menu_wallpaper" msgid="5837429080911269832">"Fond d\'écran"</string>
     <string name="menu_search" msgid="4826514464423239041">"Rechercher"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 9e78e7e..50b5bdf 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -54,13 +54,13 @@
     <string name="menu_gestures" msgid="514678675575912237">"手势"</string>
     <string name="menu_settings" msgid="6233960148378443661">"设置"</string>
     <string name="permlab_install_shortcut" msgid="1201690825493376489">"安装快捷方式"</string>
-    <string name="permdesc_install_shortcut" msgid="7429365847558984148">"允许应用程序在无人操作的情况下添加快捷方式。"</string>
+    <string name="permdesc_install_shortcut" msgid="7429365847558984148">"允许应用程序在没有用户介入的情况下添加快捷方式。"</string>
     <string name="permlab_uninstall_shortcut" msgid="7696645932555926449">"卸载快捷方式"</string>
-    <string name="permdesc_uninstall_shortcut" msgid="959972195916090900">"允许应用程序在无人操作的情况下删除快捷方式。"</string>
-    <string name="permlab_read_settings" msgid="3452408290738106747">"读取主屏幕设置和快捷方式"</string>
-    <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="permdesc_uninstall_shortcut" msgid="959972195916090900">"允许应用程序在没有用户介入的情况下删除快捷方式。"</string>
+    <string name="permlab_read_settings" msgid="3452408290738106747">"读取主屏幕的设置和快捷方式"</string>
+    <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/src/com/android/launcher2/AllAppsList.java b/src/com/android/launcher2/AllAppsList.java
index 4d3ee77..561b345 100644
--- a/src/com/android/launcher2/AllAppsList.java
+++ b/src/com/android/launcher2/AllAppsList.java
@@ -152,7 +152,7 @@
                     data.add(applicationInfo);
                     added.add(applicationInfo);
                 } else {
-                    AppInfoCache.update(info, applicationInfo, context);
+                    AppInfoCache.update(info, applicationInfo, context, bubble);
                     modified.add(applicationInfo);
                 }
             }
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index 9b521b9..fe8ded1 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -676,7 +676,8 @@
 
         for (int i=0; i<N; i++) {
             final ApplicationInfo item = list.get(i);
-            int index = Collections.binarySearch(mAllAppsList, item, mAppNameComp);
+            int index = Collections.binarySearch(mAllAppsList, item,
+                    LauncherModel.APP_NAME_COMPARATOR);
             if (index < 0) {
                 index = -(index+1);
             }
@@ -725,16 +726,6 @@
         addApps(list);
     }
 
-    private Comparator<ApplicationInfo> mAppNameComp = new Comparator<ApplicationInfo>() {
-        public int compare(ApplicationInfo a, ApplicationInfo b) {
-            int result = a.title.toString().compareTo(b.toString());
-            if (result != 0) {
-                return result;
-            }
-            return a.intent.getComponent().compareTo(b.intent.getComponent());
-        }
-    };
-
     private static int findAppByComponent(ArrayList<ApplicationInfo> list, ApplicationInfo item) {
         ComponentName component = item.intent.getComponent();
         final int N = list.size();
diff --git a/src/com/android/launcher2/AppInfoCache.java b/src/com/android/launcher2/AppInfoCache.java
index 2fdfc28..a2d9830 100644
--- a/src/com/android/launcher2/AppInfoCache.java
+++ b/src/com/android/launcher2/AppInfoCache.java
@@ -86,9 +86,10 @@
     /**
      * Update the entry in the in the cache with its new metadata.
      */
-    public static void update(ResolveInfo info, ApplicationInfo applicationInfo, Context context) {
+    public static void update(ResolveInfo info, ApplicationInfo applicationInfo, Context context,
+            Utilities.BubbleText bubble) {
         synchronized (sCache) {
-            updateTitleAndIcon(info, applicationInfo, context, new Utilities.BubbleText(context));
+            updateTitleAndIcon(info, applicationInfo, context, bubble);
 
             ComponentName componentName = new ComponentName(
                     info.activityInfo.applicationInfo.packageName, info.activityInfo.name);
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 52d89c3e..327fa3a 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -418,13 +418,7 @@
             // itself again.
             mWorkspace.post(new Runnable() {
                 public void run() {
-                    ISearchManager searchManagerService = ISearchManager.Stub.asInterface(
-                            ServiceManager.getService(Context.SEARCH_SERVICE));
-                    try {
-                        searchManagerService.stopSearch();
-                    } catch (RemoteException e) {
-                        Log.e(TAG, "error stopping search", e);
-                    }
+                    stopSearch();
                 }
             });
         }
@@ -819,7 +813,6 @@
     }
 
     void closeSystemDialogs() {
-        closeAllApps(true);
         getWindow().closeAllPanels();
 
         try {
@@ -1328,7 +1321,7 @@
                 case KeyEvent.KEYCODE_HOME:
                     return true;
                 case KeyEvent.KEYCODE_VOLUME_DOWN:
-                    if (SystemProperties.getInt("launcher2.dumpstate", 0) != 0) {
+                    if (SystemProperties.getInt("debug.launcher2.dumpstate", 0) != 0) {
                         dumpState();
                         return true;
                     }
@@ -1847,6 +1840,28 @@
         //mHandleView.setVisibility(View.GONE);
     }
 
+    /**
+     * Things to test when changing this code:
+     *   - Home from workspace
+     *          - from center screen
+     *          - from other screens
+     *   - Home from all apps
+     *   - Back from all apps
+     *   - Launch app from workspace and quit
+     *          - with back
+     *          - with home
+     *   - Launch app from all apps and quit
+     *          - with back
+     *          - with home
+     *   - On workspace, long press power and go back
+     *          - with back
+     *          - with home
+     *   - On all apps, long press power and go back
+     *          - with back
+     *          - with home
+     *   - On workspace, power off
+     *   - On all apps, power off
+     */
     void closeAllApps(boolean animated) {
         if (mAllAppsGrid.isVisible()) {
             mAllAppsGrid.zoom(0.0f, animated);
@@ -1998,6 +2013,18 @@
         @Override
         public void onReceive(Context context, Intent intent) {
             closeSystemDialogs();
+            String reason = intent.getStringExtra("reason");
+            if (!"homekey".equals(reason)) {
+                boolean animate = true;
+                /*
+                if ("globalactions".equals(reason)) {
+                    // For some reason (probably the fading), this animation is
+                    // choppy, so don't show it.
+                    animate = false;
+                }
+                */
+                closeAllApps(animate);
+            }
         }
     }
 
@@ -2195,6 +2222,7 @@
     public void bindPackageUpdated(String packageName, ArrayList<ApplicationInfo> apps) {
         removeDialog(DIALOG_CREATE_SHORTCUT);
         mWorkspace.updateShortcutsForPackage(packageName);
+        mAllAppsGrid.updateApps(packageName, apps);
     }
 
     /**
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index d9017da..97fa554 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -963,8 +963,8 @@
                             // This builds the icon bitmaps.
                             mAllAppsList.add(AppInfoCache.cache(apps.get(i), context, bubble));
                         }
-                        Collections.sort(mAllAppsList.data, sComparator);
-                        Collections.sort(mAllAppsList.added, sComparator);
+                        Collections.sort(mAllAppsList.data, APP_NAME_COMPARATOR);
+                        Collections.sort(mAllAppsList.added, APP_NAME_COMPARATOR);
                         if (DEBUG_LOADERS) {
                             Log.d(TAG, "cached app icons in "
                                     + (SystemClock.uptimeMillis()-t) + "ms");
@@ -1220,7 +1220,7 @@
     }
 
     private static final Collator sCollator = Collator.getInstance();
-    private static final Comparator<ApplicationInfo> sComparator
+    public static final Comparator<ApplicationInfo> APP_NAME_COMPARATOR
             = new Comparator<ApplicationInfo>() {
         public final int compare(ApplicationInfo a, ApplicationInfo b) {
             return sCollator.compare(a.title.toString(), b.title.toString());
diff --git a/src/com/android/launcher2/Search.java b/src/com/android/launcher2/Search.java
index f963048..283042d 100644
--- a/src/com/android/launcher2/Search.java
+++ b/src/com/android/launcher2/Search.java
@@ -253,7 +253,8 @@
             if (animation.hasEnded() 
                     && animation.getFillAfter()
                     && animation.willChangeBounds()) {
-                ((View) getParent()).invalidate();
+                View parent = (View) getParent();
+                if (parent != null) parent.invalidate();
             } else {
                 invalidate();
             }