summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Michael Mikhail <michaelmikhil@google.com> 2024-06-04 19:18:45 +0000
committer Michael Mikhail <michaelmikhil@google.com> 2024-06-05 01:09:44 +0000
commitcf74abb57b20fab6e05f97ddf1730f61517f8226 (patch)
treea38d322d54d0710a019e5b6036f0c968e4b2ee78 /libs/androidfw/StringPool.cpp
parentf7caa4dfabb88bae908153e1cfb32f275dc19305 (diff)
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions