summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r--src/com/android/launcher2/Launcher.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index d7dd6480a..659077f71 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -3145,9 +3145,13 @@ public final class Launcher extends Activity
View shortcut = createShortcut(info);
workspace.addInScreen(shortcut, item.container, item.screen, item.cellX,
item.cellY, 1, 1, false);
- if (newApps.contains(uri)) {
- newApps.remove(uri);
-
+ boolean animateIconUp = false;
+ synchronized (newApps) {
+ if (newApps.contains(uri)) {
+ animateIconUp = newApps.remove(uri);
+ }
+ }
+ if (animateIconUp) {
// Prepare the view to be animated up
shortcut.setAlpha(0f);
shortcut.setScaleX(0f);