summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-06-25 14:45:32 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-06-25 14:45:32 -0700
commit9dc25f06a870938a2adb976194da78574825e83e (patch)
treed454ddf1a7f79e95c5320d1e18b87a4f1877fb7a
parenteb04476def775427a4d216c9ce32e53da5ad4765 (diff)
parent3df7dcf513e0e38ab621d38e318bdefb96f0aa81 (diff)
downloadandroid_packages_apps_Trebuchet-9dc25f06a870938a2adb976194da78574825e83e.zip
android_packages_apps_Trebuchet-9dc25f06a870938a2adb976194da78574825e83e.tar.gz
android_packages_apps_Trebuchet-9dc25f06a870938a2adb976194da78574825e83e.tar.bz2
Merge "Fixing concurrent modification exception when iterating through new apps list. (Bug 6621553)" into jb-dev
-rw-r--r--src/com/android/launcher2/Workspace.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 0192630..2d2340a 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -3684,12 +3684,13 @@ public class Workspace extends SmoothPagedView
// Remove all queued items that match the same package
if (newApps != null) {
synchronized (newApps) {
- for (String intentStr : newApps) {
+ Iterator<String> iter = newApps.iterator();
+ while (iter.hasNext()) {
try {
- Intent intent = Intent.parseUri(intentStr, 0);
+ Intent intent = Intent.parseUri(iter.next(), 0);
String pn = ItemInfo.getPackageName(intent);
if (packageNames.contains(pn)) {
- newApps.remove(intentStr);
+ iter.remove();
}
} catch (URISyntaxException e) {}
}