summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/UninstallShortcutReceiver.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/UninstallShortcutReceiver.java')
-rw-r--r--src/com/android/launcher2/UninstallShortcutReceiver.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher2/UninstallShortcutReceiver.java b/src/com/android/launcher2/UninstallShortcutReceiver.java
index 84b1ad50e..e94a17ffd 100644
--- a/src/com/android/launcher2/UninstallShortcutReceiver.java
+++ b/src/com/android/launcher2/UninstallShortcutReceiver.java
@@ -139,9 +139,11 @@ public class UninstallShortcutReceiver extends BroadcastReceiver {
boolean appRemoved;
Set<String> newApps = new HashSet<String>();
newApps = sharedPrefs.getStringSet(InstallShortcutReceiver.NEW_APPS_LIST_KEY, newApps);
- do {
- appRemoved = newApps.remove(intent.toUri(0).toString());
- } while (appRemoved);
+ synchronized (newApps) {
+ do {
+ appRemoved = newApps.remove(intent.toUri(0).toString());
+ } while (appRemoved);
+ }
if (appRemoved) {
final Set<String> savedNewApps = newApps;
new Thread("setNewAppsThread-remove") {