Fix overlogging of filter and section changes
The addition of a second round of filtering introduced a bug that would cause the system to log false filter and section changes for all notifs on every run of the pipeline. Previously, we had logic like the following: (assume that, in the previous run, entryA was filtered out by filter1 during the pre-finalized stage) 1. preGroupFilters run, nothing returns true. Set entryA.mExcludingFilter to null. It changed! Log it. 2. preFinalizeFilters run, filter1 returns true. Set entryA.mExcludingFilter to it. It changed! Log it. NotifSections had a similar bug that would null out their assigned section every time they were filtered out. To solve this, we introduce an mPreviousExcludingFilter field on NotificationEntry that will allow us to determine whether the filter actually changed as compared to the previous run. We also move that logging logic to the end of the pipeline. To solve the sectioning issue, we just don't null out sections when the entry is filtered out. Long-term, we should move to a system similar to the one above, but that's more complicated. Test: atest Bug: 112656837 Change-Id: Ib78dbbb0346947210cc1b6b49547595895e9fce5
Loading
Please register or sign in to comment