diff options
author | Adam Cohen <adamcohen@google.com> | 2014-02-05 11:47:43 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-06-06 22:54:28 -0700 |
commit | 3f2ae36a8778309b9479cc8c90a474b885746910 (patch) | |
tree | 75d1fe42af72f2497f4c217135512f549a0ec598 /src/com/android/launcher3/Launcher.java | |
parent | dfdec456504431259e77e75339bded5c77f2e998 (diff) | |
download | android_packages_apps_Trebuchet-3f2ae36a8778309b9479cc8c90a474b885746910.tar.gz android_packages_apps_Trebuchet-3f2ae36a8778309b9479cc8c90a474b885746910.tar.bz2 android_packages_apps_Trebuchet-3f2ae36a8778309b9479cc8c90a474b885746910.zip |
Small refactor to separate adding workspace / all apps items
Change-Id: I06b7bc7f7f0e01696cb9670b8385e5148593e3e0
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index b775c08ea..1563eea0d 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -4012,15 +4012,17 @@ public class Launcher extends Activity } // Add the new screens - bindAddScreens(newScreens); + if (newScreens != null) { + bindAddScreens(newScreens); + } // We add the items without animation on non-visible pages, and with // animations on the new page (which we will try and snap to). - if (!addNotAnimated.isEmpty()) { + if (addNotAnimated != null && !addNotAnimated.isEmpty()) { bindItems(addNotAnimated, 0, addNotAnimated.size(), false); } - if (!addAnimated.isEmpty()) { + if (addAnimated != null && !addAnimated.isEmpty()) { bindItems(addAnimated, 0, addAnimated.size(), true); } |