Skip to content
Commit 4258d70a authored by Ned Burns's avatar Ned Burns
Browse files

Optimistically dismiss children of dismissed groups

When a group summary is dismissed, system server automatically dismisses
all of its children as well. To avoid flickering on sysui side while we
wait for these dismissals to come in, we mark the summary as well as its
children as "dismissed" and filter them all out immediately.

We don't actually remove the entry or its children from the
NotifCollection until we hear back from system server. This allows us to
stay as close as possible to system server's state and to know exactly
when we are deviating.

 - dismissNotification() no longer calls removeNotification(). Instead
   it just marks the notif as locally dismissed.
 - As a side-effect of the above, onEntryRemoved() is no longer called
   when a user dismisses a notification. It will be called later, when
   system server gets back to us and confirms the retraction. Removes
   the removedByUser parameter as a result.
 - Adds HideLocallyDismissedNotifsCoordinator, which filters out any
   notif that has been marked as locally dismissed.
 - User-dismissed (i.e. locally dismissed) notifications can no longer
   be lifetime extended. If the user wants 'em gone, they're gone.
 - removeNotification() renamed to tryRemoveNotification() and is now
   solely responsibly for managing lifetime extenders and removing a
   notif from the notif set if no lifetime extenders want to
   countermand.
 - onNotificationRemoved() takes on some of removeNotification()s old
   responsibilities, mainly around updating rankings.
 - Local dismissal and lifetime extension had some funky interactions;
   those should be worked out now.
 - As a side-effect of the above, we're now tracking the cancellation
   reason for all lifetime-extended notifs.

Test: atest
Bug: 112656837
Change-Id: I3c8bbf31af6c247b3f2de659266cb1f02011d710
parent 098584d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment