Remove NotificationData
Ye olde NotificationData class was responsible for a few general things: - Keep a list of visible `NotificationEntry`s - Filter / sort the visible entries - Keep a sorted / filtered list of those entries - Answer lots of questions about the entries themselves (rank, isAmbient, list of entries for current user, etc.) - Keep track of the current RankingMap - Set priority buckets on entries - Tell the group manager when things changed The basic idea here is to remove NotificationData in favor of 3 other changes: 1. Any place which needed to query NotificationData for info about the entry (in particular its ranking) can just ask the entry for it now. Entries all keep a reference to their rank 2. NotificationEntryManager now just maintains its own list of visible notifications. It was already the point of contact to get a handle to NotificationData so this makes call sites simpler. 3. Create a simpler NotificationRankingManager (maybe delete this eventually) to encapsulate the sorting logic and hang on to the latest RankingMap Test: atest SystemUITests Change-Id: I14073e103c6d50da37207ca8fd86828da0aaaff9
Loading
Please register or sign in to comment