Reload everything when coming back from the SD being unmounted.
We could do this more efficiently by only updating the packages that
have changed, but that would involve a big rewrite.
Bug: 3020854
Change-Id: Ie7e3bee20f45dc5efa93d960902e9dfb79c4a3a5
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 06fcfb3..0978499 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -340,8 +340,9 @@
}
} else if (Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(action)) {
- String[] packages = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);
- enqueuePackageUpdated(new PackageUpdatedTask(PackageUpdatedTask.OP_ADD, packages));
+ // When everything comes back, just reload everything. We might not
+ // have the right icons for apps on external storage.
+ startLoader(mApp, false);
} else if (Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) {
String[] packages = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);