diff options
author | Winson Chung <winsonc@google.com> | 2012-07-16 20:45:03 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2012-07-16 20:48:04 -0700 |
commit | 5d55f33a1d7a16a11fb759d8f37eeef45e132b98 (patch) | |
tree | 6f263394c3ade926b01c3114f4339a808c9aa5c3 /src/com/android/launcher2 | |
parent | 4973aaf797de3f9ced2797eb4194a721a9ff8cbf (diff) | |
download | android_packages_apps_Trebuchet-5d55f33a1d7a16a11fb759d8f37eeef45e132b98.tar.gz android_packages_apps_Trebuchet-5d55f33a1d7a16a11fb759d8f37eeef45e132b98.tar.bz2 android_packages_apps_Trebuchet-5d55f33a1d7a16a11fb759d8f37eeef45e132b98.zip |
Fixing issue where we were not clearing the set of removed items since the last event. (Bug 6749258)
Change-Id: I21ed2810e902e2727959b1a4cc0cd6183b750603
Diffstat (limited to 'src/com/android/launcher2')
-rw-r--r-- | src/com/android/launcher2/AppsCustomizePagedView.java | 3 | ||||
-rw-r--r-- | src/com/android/launcher2/LauncherModel.java | 17 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index 84bdc96f9..80fc62fce 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -1736,7 +1736,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen ApplicationInfo info = list.get(i); int removeIndex = findAppByComponent(mApps, info); if (removeIndex > -1) { - Log.d(TAG, "Removing app in removeAppsWithoutInvalidate: " + info); mApps.remove(removeIndex); } } @@ -1746,8 +1745,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen for (String pn : packageNames) { int removeIndex = findAppByPackage(mApps, pn); while (removeIndex > -1) { - Log.d(TAG, "Removing app in removeAppsWithPackageNameWithoutInvalidate: " - + mApps.get(removeIndex)); mApps.remove(removeIndex); removeIndex = findAppByPackage(mApps, pn); } diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java index 1890e74f3..2c5f03ace 100644 --- a/src/com/android/launcher2/LauncherModel.java +++ b/src/com/android/launcher2/LauncherModel.java @@ -1715,20 +1715,23 @@ public class LauncherModel extends BroadcastReceiver { ArrayList<ApplicationInfo> modified = null; if (mBgAllAppsList.added.size() > 0) { - added = mBgAllAppsList.added; - mBgAllAppsList.added = new ArrayList<ApplicationInfo>(); + added = new ArrayList<ApplicationInfo>(mBgAllAppsList.added); + mBgAllAppsList.added.clear(); } if (mBgAllAppsList.modified.size() > 0) { - modified = mBgAllAppsList.modified; - mBgAllAppsList.modified = new ArrayList<ApplicationInfo>(); + modified = new ArrayList<ApplicationInfo>(mBgAllAppsList.modified); + mBgAllAppsList.modified.clear(); } - // We may be removing packages that have no associated launcher application, so we // pass through the removed package names directly. // NOTE: We flush the icon cache aggressively in removePackage() above. final ArrayList<String> removedPackageNames = new ArrayList<String>(); - for (int i = 0; i < N; ++i) { - removedPackageNames.add(packages[i]); + if (mBgAllAppsList.removed.size() > 0) { + mBgAllAppsList.removed.clear(); + + for (int i = 0; i < N; ++i) { + removedPackageNames.add(packages[i]); + } } final Callbacks callbacks = mCallbacks != null ? mCallbacks.get() : null; |