diff options
Diffstat (limited to 'src/com/android/launcher3/notification')
-rw-r--r-- | src/com/android/launcher3/notification/NotificationFooterLayout.java | 3 | ||||
-rw-r--r-- | src/com/android/launcher3/notification/NotificationItemView.java | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/com/android/launcher3/notification/NotificationFooterLayout.java b/src/com/android/launcher3/notification/NotificationFooterLayout.java index 2965e4a63..eef1d6194 100644 --- a/src/com/android/launcher3/notification/NotificationFooterLayout.java +++ b/src/com/android/launcher3/notification/NotificationFooterLayout.java @@ -40,7 +40,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; /** * A {@link LinearLayout} that contains icons of notifications. If there is only one icon, @@ -191,7 +190,7 @@ public class NotificationFooterLayout extends LinearLayout { animation.start(); } - public void trimNotifications(Set<String> notifications) { + public void trimNotifications(List<String> notifications) { if (!isAttachedToWindow() || mIconRow.getChildCount() == 0) { return; } diff --git a/src/com/android/launcher3/notification/NotificationItemView.java b/src/com/android/launcher3/notification/NotificationItemView.java index f38838261..b74cd4e1e 100644 --- a/src/com/android/launcher3/notification/NotificationItemView.java +++ b/src/com/android/launcher3/notification/NotificationItemView.java @@ -34,9 +34,8 @@ import com.android.launcher3.R; import com.android.launcher3.graphics.IconPalette; import com.android.launcher3.popup.PopupItemView; -import java.util.HashSet; +import java.util.ArrayList; import java.util.List; -import java.util.Set; import static com.android.launcher3.LauncherAnimUtils.animateViewHeight; @@ -122,7 +121,7 @@ public class NotificationItemView extends PopupItemView { mFooter.applyColors(iconPalette); } - public void trimNotifications(final Set<String> notificationKeys) { + public void trimNotifications(final List<String> notificationKeys) { boolean dismissedMainNotification = !notificationKeys.contains( mMainView.getNotificationInfo().notificationKey); if (dismissedMainNotification && !mAnimatingNextIcon) { @@ -137,7 +136,10 @@ public class NotificationItemView extends PopupItemView { public void onIconAnimationEnd(NotificationInfo newMainNotification) { if (newMainNotification != null) { mMainView.applyNotificationInfo(newMainNotification, mIconView, mIconPalette); - Set<String> footerNotificationKeys = new HashSet<>(notificationKeys); + // Remove the animated notification from the footer by calling trim + // TODO: Remove the notification in NotificationFooterLayout directly + // instead of relying on this hack. + List<String> footerNotificationKeys = new ArrayList<>(notificationKeys); footerNotificationKeys.remove(newMainNotification.notificationKey); mFooter.trimNotifications(footerNotificationKeys); mMainView.setVisibility(VISIBLE); |