summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony <twickham@google.com>2017-03-02 01:31:14 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-02 01:31:14 +0000
commit96ab9d2c57c6fc07a3614ea29808cf2285880bc3 (patch)
tree371e480a25b2fbd2d8046f4e704348487c27f389 /src
parent2dcd0ad935f781388f0e920241b54b36b98749f6 (diff)
parent7a0010d20e75310a149616401a9bc14e59c037e8 (diff)
downloadandroid_packages_apps_Trebuchet-96ab9d2c57c6fc07a3614ea29808cf2285880bc3.tar.gz
android_packages_apps_Trebuchet-96ab9d2c57c6fc07a3614ea29808cf2285880bc3.tar.bz2
android_packages_apps_Trebuchet-96ab9d2c57c6fc07a3614ea29808cf2285880bc3.zip
Merge "Add null check when populating popup" into ub-launcher3-dorval
am: 7a0010d20e Change-Id: Ia89cbcec58fbfbf509187538a51ffa68d3353467
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/popup/PopupContainerWithArrow.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index 15dde4330..0b0f88aaf 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -70,6 +70,8 @@ import com.android.launcher3.shortcuts.DeepShortcutView;
import com.android.launcher3.shortcuts.ShortcutsItemView;
import com.android.launcher3.util.PackageUserKey;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -182,14 +184,12 @@ public class PopupContainerWithArrow extends AbstractFloatingView implements Dra
orientAboutIcon(originalIcon, arrowHeight + arrowVerticalOffset);
}
- List<DeepShortcutView> shortcutViews = mShortcutsItemView.getDeepShortcutViews(reverseOrder);
- for (int i = 0; i < itemsToPopulate.length; i++) {
- switch (itemsToPopulate[i]) {
- case NOTIFICATION:
- IconPalette iconPalette = originalIcon.getIconPalette();
- mNotificationItemView.applyColors(iconPalette);
- break;
- }
+ List<DeepShortcutView> shortcutViews = mShortcutsItemView == null
+ ? Collections.EMPTY_LIST
+ : mShortcutsItemView.getDeepShortcutViews(reverseOrder);
+ if (mNotificationItemView != null) {
+ IconPalette iconPalette = originalIcon.getIconPalette();
+ mNotificationItemView.applyColors(iconPalette);
}
// Add the arrow.