Remove first icon from notification footer after it animates.
Before, we had a hack where the notifation view would tell the footer to trim its notifications, which is inefficient and ugly since we already know exactly what notification to remove. So now we move the relevant removal logic (keeping things like the overflow text in sync) to a removeViewFromIconRow() that is used after the icon animates as well as when trimming notifications. Bug: 32410600 Change-Id: I19e54e0c28daea869b45649c7f5c74843412bb86
This commit is contained in:
1 parent
9f0fa84439
commit
6d66c1cfeb
2 files changed
+41
-41
No files matched your search
@@ -37,7 +37,6 @@ import com.android.launcher3.logging.UserEventDispatcher.LogContainerProvider;
|
||||
import com.android.launcher3.popup.PopupItemView;
|
||||
import com.android.launcher3.userevent.nano.LauncherLogProto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.android.launcher3.LauncherAnimUtils.animateViewHeight;
|
||||
@@ -145,12 +144,6 @@ public class NotificationItemView extends PopupItemView implements LogContainerP
|
||||
public void onIconAnimationEnd(NotificationInfo newMainNotification) {
|
||||
if (newMainNotification != null) {
|
||||
mMainView.applyNotificationInfo(newMainNotification, mIconView, true);
|
||||
// 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);
|
||||
}
|
||||
mAnimatingNextIcon = false;
|
||||
|
||||
Reference in new issue
Block a user