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

Skip to content
Commit cf74abb5 authored by Michael Mikhail's avatar Michael Mikhail
Browse files

Fix race condition using notification pipeline

It turns out that NotifPipeline returns a pointer to allNotifs field in
NotifCollection when getAllNotifs() is called. This list can be modified
by main thread which updates the list being sent to background. This
leads to a race condition.
This CL creates a list of StatusbarNotification being added from
notification entry returned from getAllNotifs() in main thread. So we
make sure the list of notifications being sent to background thread
should not get modified by main thread.
When notification entry is updated, sbn is being reset. Storing all
statusbar notifications ensures they don't get updated by main thread
when they are being accessed by background thread.

Flag: com.android.systemui.notification_media_manager_background_execution
Bug: 336612071
Test: atest NotificationMediaManagerTest

Change-Id: I84a7270b8f8367267ea0e870c0f615dfdffcf345
parent f7caa4df
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment