OSDN Git Service

passion - fix 2176920 - all apps cleared after deleting folder
authorJoe Onorato <joeo@android.com>
Wed, 14 Oct 2009 18:13:48 +0000 (11:13 -0700)
committerJoe Onorato <joeo@android.com>
Wed, 14 Oct 2009 18:13:48 +0000 (11:13 -0700)
src/com/android/launcher2/Launcher.java
src/com/android/launcher2/LauncherModel.java

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