Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 83461490 authored by Alexander Roederer's avatar Alexander Roederer
Browse files

Fix race on setCanceledAfterLifetimeExtension

We setCancaledAfterLifetimeExtension to avoid multiple cancelation calls
from causing multiple updates being sent to System UI, but were setting
the value on a callback after the post to System UI had occurred.
Unfortunately apps can cancel more quickly than that; these cancelations
will enqueue multiple posts before the callback from systemUI occurs,
and they'll all be sent.

This leads to the same message being posted repeatedly.

So, instead, we move the set to immediately after we've checked
that the record doesn't have the value set, and have committed to the path
where an update will be sent to system UI.

Bug: 371105236
Test: atest NotificationManagerService, flash+test
Flag: android.app.lifetime_extension_refactor
Change-Id: I82d0dfc9940f02108b61f4d8574c9135505efa58
parent dd1ce567
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment