Merge "Ensure system shortcut icons always appear in correct order" into ub-launcher3-dorval
am: 50ba921aa8
Change-Id: Ie296f30e81bea966e1cfc88b81b33cbc1b5bf6e0
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index 99c7e75..d2512de 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -193,7 +193,7 @@
: mShortcutsItemView.getDeepShortcutViews(reverseOrder);
List<View> systemShortcutViews = mShortcutsItemView == null
? Collections.EMPTY_LIST
- : mShortcutsItemView.getSystemShortcutViews(reverseOrder || true);
+ : mShortcutsItemView.getSystemShortcutViews(reverseOrder);
if (mNotificationItemView != null) {
BadgeInfo badgeInfo = mLauncher.getPopupDataProvider()
.getBadgeInfoForItem(originalItemInfo);
diff --git a/src/com/android/launcher3/shortcuts/ShortcutsItemView.java b/src/com/android/launcher3/shortcuts/ShortcutsItemView.java
index ef6365b..1f90bb0 100644
--- a/src/com/android/launcher3/shortcuts/ShortcutsItemView.java
+++ b/src/com/android/launcher3/shortcuts/ShortcutsItemView.java
@@ -151,7 +151,9 @@
}
public List<View> getSystemShortcutViews(boolean reverseOrder) {
- if (reverseOrder) {
+ // Always reverse system shortcut icons (in the header)
+ // so they are in priority order from right to left.
+ if (reverseOrder || mSystemShortcutIcons != null) {
Collections.reverse(mSystemShortcutViews);
}
return mSystemShortcutViews;