Merge "Ensure system shortcut icons always appear in correct order" into ub-launcher3-dorval

This commit is contained in:
Tony Wickham
2017-04-14 18:01:33 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 2 deletions
@@ -193,7 +193,7 @@ public class PopupContainerWithArrow extends AbstractFloatingView implements Dra
: 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);
@@ -151,7 +151,9 @@ public class ShortcutsItemView extends PopupItemView implements View.OnLongClick
}
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;