Lifetime extension to not update on multicancel
Adds a new field to NotificationRecord that records when a lifetime
extended notification has been cancelled by an app. Then, when an app
sends a cancellation, we check that field before we update system UI.
This allows us to avoid sending multiple updates to system ui when an
app cancels repeatedly. These multiple cancelations were causing
rendering issues.
As a side effect, we can also remove the ONLY_ALERT_ONCE flag we added,
because we'll no longer cause multiple huns to appear because of sending
multiple updates.
Bug: 299448097
Flag: android.app.lifetime_extension_refactor
Test: flash, atest NotificationManagerServiceTest
Change-Id: Idc8e16d7aef321eaa76c64214febb79af4690463
3 files changed