Loading src/com/android/launcher3/notification/NotificationFooterLayout.java +3 −8 Original line number Diff line number Diff line Loading @@ -36,10 +36,8 @@ import com.android.launcher3.graphics.IconPalette; import com.android.launcher3.popup.PopupContainerWithArrow; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; /** * A {@link LinearLayout} that contains only icons of notifications. Loading @@ -57,7 +55,6 @@ public class NotificationFooterLayout extends LinearLayout { private final List<NotificationInfo> mNotifications = new ArrayList<>(); private final List<NotificationInfo> mOverflowNotifications = new ArrayList<>(); private final Map<View, NotificationInfo> mViewsToInfos = new HashMap<>(); LinearLayout.LayoutParams mIconLayoutParams; private LinearLayout mIconRow; Loading Loading @@ -115,7 +112,6 @@ public class NotificationFooterLayout extends LinearLayout { */ public void commitNotificationInfos() { mIconRow.removeAllViews(); mViewsToInfos.clear(); for (int i = 0; i < mNotifications.size(); i++) { NotificationInfo info = mNotifications.get(i); Loading @@ -141,8 +137,8 @@ public class NotificationFooterLayout extends LinearLayout { icon.setAlpha(0); icon.animate().alpha(1); } icon.setTag(info); mIconRow.addView(icon, addIndex, mIconLayoutParams); mViewsToInfos.put(icon, info); } private void updateOverflowText(TextView overflowTextView) { Loading @@ -165,7 +161,7 @@ public class NotificationFooterLayout extends LinearLayout { moveAndScaleIcon.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { callback.onIconAnimationEnd(mViewsToInfos.get(firstNotification)); callback.onIconAnimationEnd((NotificationInfo) firstNotification.getTag()); } }); animation.play(moveAndScaleIcon); Loading Loading @@ -207,11 +203,10 @@ public class NotificationFooterLayout extends LinearLayout { if (child instanceof TextView) { overflowView = (TextView) child; } else { NotificationInfo childInfo = mViewsToInfos.get(child); NotificationInfo childInfo = (NotificationInfo) child.getTag(); if (!notifications.contains(childInfo.notificationKey)) { mIconRow.removeView(child); mNotifications.remove(childInfo); mViewsToInfos.remove(child); if (!mOverflowNotifications.isEmpty()) { NotificationInfo notification = mOverflowNotifications.remove(0); mNotifications.add(notification); Loading Loading
src/com/android/launcher3/notification/NotificationFooterLayout.java +3 −8 Original line number Diff line number Diff line Loading @@ -36,10 +36,8 @@ import com.android.launcher3.graphics.IconPalette; import com.android.launcher3.popup.PopupContainerWithArrow; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; /** * A {@link LinearLayout} that contains only icons of notifications. Loading @@ -57,7 +55,6 @@ public class NotificationFooterLayout extends LinearLayout { private final List<NotificationInfo> mNotifications = new ArrayList<>(); private final List<NotificationInfo> mOverflowNotifications = new ArrayList<>(); private final Map<View, NotificationInfo> mViewsToInfos = new HashMap<>(); LinearLayout.LayoutParams mIconLayoutParams; private LinearLayout mIconRow; Loading Loading @@ -115,7 +112,6 @@ public class NotificationFooterLayout extends LinearLayout { */ public void commitNotificationInfos() { mIconRow.removeAllViews(); mViewsToInfos.clear(); for (int i = 0; i < mNotifications.size(); i++) { NotificationInfo info = mNotifications.get(i); Loading @@ -141,8 +137,8 @@ public class NotificationFooterLayout extends LinearLayout { icon.setAlpha(0); icon.animate().alpha(1); } icon.setTag(info); mIconRow.addView(icon, addIndex, mIconLayoutParams); mViewsToInfos.put(icon, info); } private void updateOverflowText(TextView overflowTextView) { Loading @@ -165,7 +161,7 @@ public class NotificationFooterLayout extends LinearLayout { moveAndScaleIcon.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { callback.onIconAnimationEnd(mViewsToInfos.get(firstNotification)); callback.onIconAnimationEnd((NotificationInfo) firstNotification.getTag()); } }); animation.play(moveAndScaleIcon); Loading Loading @@ -207,11 +203,10 @@ public class NotificationFooterLayout extends LinearLayout { if (child instanceof TextView) { overflowView = (TextView) child; } else { NotificationInfo childInfo = mViewsToInfos.get(child); NotificationInfo childInfo = (NotificationInfo) child.getTag(); if (!notifications.contains(childInfo.notificationKey)) { mIconRow.removeView(child); mNotifications.remove(childInfo); mViewsToInfos.remove(child); if (!mOverflowNotifications.isEmpty()) { NotificationInfo notification = mOverflowNotifications.remove(0); mNotifications.add(notification); Loading