summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-06-25 21:47:03 (GMT)
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-25 21:47:03 (GMT)
commitbcff7eda3731b7af254a1d5182766683ea1d46e3 (patch)
treed454ddf1a7f79e95c5320d1e18b87a4f1877fb7a
parent7db2f5bf24c20c613c0f76a19e810f91e752976c (diff)
parent9dc25f06a870938a2adb976194da78574825e83e (diff)
downloadandroid_packages_apps_Trebuchet-bcff7eda3731b7af254a1d5182766683ea1d46e3.zip
android_packages_apps_Trebuchet-bcff7eda3731b7af254a1d5182766683ea1d46e3.tar.gz
android_packages_apps_Trebuchet-bcff7eda3731b7af254a1d5182766683ea1d46e3.tar.bz2
am 9dc25f06: Merge "Fixing concurrent modification exception when iterating through new apps list. (Bug 6621553)" into jb-dev
* commit '9dc25f06a870938a2adb976194da78574825e83e': Fixing concurrent modification exception when iterating through new apps list. (Bug 6621553)
-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) {}
}