am 34b02499: passion - fix 2176920 - all apps cleared after deleting folder

Merge commit '34b02499432896b60cdb9f78c9d1019c80ef6ef5' into eclair-mr2

* commit '34b02499432896b60cdb9f78c9d1019c80ef6ef5':
  passion - fix 2176920 - all apps cleared after deleting folder
This commit is contained in:
Joe Onorato authored and Android Git Automerger committed 2009-10-14 11:25:23 -07:00
commit cd32d33296
2 files changed
+6 -4

No files matched your search

-1
View File
@@ -1923,7 +1923,6 @@ public final class Launcher extends Activity
* Implementation of the method from LauncherModel.Callbacks. * Implementation of the method from LauncherModel.Callbacks.
*/ */
public void bindAllApplications(ArrayList<ApplicationInfo> apps) { public void bindAllApplications(ArrayList<ApplicationInfo> apps) {
Log.d(LOG_TAG, "got info for " + apps.size() + " apps");
mAllAppsList = apps; mAllAppsList = apps;
mAllAppsGrid.setApps(mAllAppsList); mAllAppsGrid.setApps(mAllAppsList);
} }
+6 -3
View File
@@ -523,7 +523,9 @@ public class LauncherModel {
} }
// Bind all apps // Bind all apps
bindAllApps(); if (allAppsDirty) {
bindAllApps();
}
// Clear out this reference, otherwise we end up holding it until all of the // Clear out this reference, otherwise we end up holding it until all of the
// callback runnables are done. // callback runnables are done.
@@ -915,14 +917,15 @@ public class LauncherModel {
mAllAppsList.added = new ArrayList(); mAllAppsList.added = new ArrayList();
mHandler.post(new Runnable() { mHandler.post(new Runnable() {
public void run() { public void run() {
long t = SystemClock.uptimeMillis(); final long t = SystemClock.uptimeMillis();
final int count = results.size();
Callbacks callbacks = tryGetCallbacks(); Callbacks callbacks = tryGetCallbacks();
if (callbacks != null) { if (callbacks != null) {
callbacks.bindAllApplications(results); callbacks.bindAllApplications(results);
} }
Log.d(TAG, "bound app icons in " Log.d(TAG, "bound app " + count + " icons in "
+ (SystemClock.uptimeMillis()-t) + "ms"); + (SystemClock.uptimeMillis()-t) + "ms");
} }
}); });