[Notif] Auto-promote notifications ealier in the pipeline.
The existing PromotedNotificationsProvider class that automatically promotes certain notifications for testing purposes is only triggered at the end of the notification pipeline, after rendering has finished. This works for the status bar chips, but doesn't work for other notification promotion features like higher ranking. This CL re-works PromotedNotificationsProvider to: 1) Happen earlier in the notif pipeline so it can be used by other promotion features 2) Changes how notifications are marked as auto-promoted. In this CL, FLAG_PROMOTED_ONGOING is set to true so that all other parts of the pipeline can just check `Notification.isPromotedOngoing()` and they don't need to worry about whether a notification was promoted via the standard criteria or automatically promoted. It also renames the provider + associated classes to AutomaticPromotionCoordinator. Bug: 364653005 Flag: com.android.systemui.promote_notifications_automatically Test: Send a notification that should be auto promoted -> verify it gets promoted and has a status bar chip Change-Id: I159f44d6f56fbfbeb48a1a002df338c0c6742d26
Loading
Please register or sign in to comment