diff options
author | Winson Chung <winsonc@google.com> | 2012-06-25 14:45:32 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-06-25 14:45:32 -0700 |
commit | 9dc25f06a870938a2adb976194da78574825e83e (patch) | |
tree | d454ddf1a7f79e95c5320d1e18b87a4f1877fb7a /src/com/android/launcher2 | |
parent | eb04476def775427a4d216c9ce32e53da5ad4765 (diff) | |
parent | 3df7dcf513e0e38ab621d38e318bdefb96f0aa81 (diff) | |
download | packages_apps_trebuchet-9dc25f06a870938a2adb976194da78574825e83e.zip packages_apps_trebuchet-9dc25f06a870938a2adb976194da78574825e83e.tar.gz packages_apps_trebuchet-9dc25f06a870938a2adb976194da78574825e83e.tar.bz2 |
Merge "Fixing concurrent modification exception when iterating through new apps list. (Bug 6621553)" into jb-dev
Diffstat (limited to 'src/com/android/launcher2')
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 7 |
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) {} } |