Prevent Media notification spam from spiking SystemUI memory use
If an app spams Media Notifications it can lead to massive increase to memory use, since the waiting loadMediaData jobs will be waiting on the background executor looper to be processed. This is especially problematic if there are other tasks taking the thread. This CL: - Moves media actions code to MediaActions.kt so it can be reused in new MediaDataLoader class - Duplicates `loadMediaData` and `loadMediaDataForResumption` calls in `MediaDataLoader` - Implements logic which cancels in-flight media data load requests for same sbn/key if an update comes in. Bug: 358350077 Flag: com.android.systemui.media_load_metadata_via_media_data_loader Test: atest LegacyMediaDataManagerImplTest MediaDataLoaderTest + device testing Change-Id: Ic29b6954c4cd3489751fafc1c8a8b92a7a2016de
Loading
Please register or sign in to comment