am 673aefe8: Merge "When the SD card comes back, we need to show the apps on it." into gingerbread

Merge commit '673aefe8b2b27790d704cc15282c8989a132877b'

* commit '673aefe8b2b27790d704cc15282c8989a132877b':
  When the SD card comes back, we need to show the apps on it.
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 2800605..d46ea07 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -414,8 +414,10 @@
             }
 
         } else if (Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(action)) {
-            // When everything comes back, just reload everything.  We might not
-            // have the right icons for apps on external storage.
+            // First, schedule to add these apps back in.
+            String[] packages = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);
+            enqueuePackageUpdated(new PackageUpdatedTask(PackageUpdatedTask.OP_ADD, packages));
+            // Then, rebind everything.
             startLoader(mApp, false);
 
         } else if (Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) {