Skip to content

fix: replace depth wallpaper broadcast with in-process callback#896

Closed
Hayao0819 wants to merge 2 commits intoMahmud0808:betafrom
Hayao0819:pr/fix-broadcast-storm
Closed

fix: replace depth wallpaper broadcast with in-process callback#896
Hayao0819 wants to merge 2 commits intoMahmud0808:betafrom
Hayao0819:pr/fix-broadcast-storm

Conversation

@Hayao0819
Copy link
Copy Markdown
Contributor

AlbumArt.broadcastAlbumArtUpdate() fires sendBroadcast() on every ScrimController.applyAndDispatchState and QSImpl.setQsExpansion call. At boot this ends up being 20+ non-protected broadcasts per second, which floods am_wtf and can lock up SystemUI to the point where you can't unlock the screen.

Both AlbumArt and DepthWallpaper run in the same SystemUI process, so there's no reason to go through system_server. Swapped the broadcast for a simple listener callback in AlbumArt's companion object. All DepthWallpaper variants (main, standard A14/A15, foss A14/A15) are updated — the visibility logic itself is unchanged.

Verified on Xperia 5 V (XQ-DE44, Android 15) — am_wtf floods and ACTION_UPDATE_DEPTH_WALLPAPER broadcasts are completely gone after the fix.

Mahmud0808 and others added 2 commits March 2, 2025 19:25
…isibility

AlbumArt was sending ACTION_UPDATE_DEPTH_WALLPAPER_FOREGROUND_VISIBILITY
as a system broadcast from SystemUI on every scrim state change and QS
expansion update. This caused a broadcast storm (20+ broadcasts/sec at
boot) that overwhelmed SystemUI, triggering am_wtf floods and rendering
the lockscreen unresponsive.

Since AlbumArt and DepthWallpaper both run inside the SystemUI process,
the cross-process broadcast was unnecessary. Replace it with a direct
in-process listener callback, eliminating the broadcast overhead entirely.
@Mahmud0808 Mahmud0808 changed the base branch from stable to beta April 11, 2026 08:00
@Mahmud0808
Copy link
Copy Markdown
Owner

Hi, it looks like this PR isn’t compatible with the beta branch. I’ll cherry-pick the relevant changes and add you as a co-author. Thanks for the contribution!

@Hayao0819
Copy link
Copy Markdown
Contributor Author

Thanks for the reply! I'll recreate this PR based on the beta branch.

Regarding my other PRs (#897, #898, #899) — they all received comments about A15 being EOL. I don't have an Android 16 device yet and will be staying on Android 15 for the foreseeable future. Is it completely out of the question to get these changes merged?

If Android 15 is fully unsupported, I'll close my PRs and maintain them in my own fork instead.

@Hayao0819
Copy link
Copy Markdown
Contributor Author

After checking the beta branch, I found that this fix is already implemented there, so there's nothing to recreate for this PR on beta.

@Mahmud0808
Copy link
Copy Markdown
Owner

Thanks for the reply! I'll recreate this PR based on the beta branch.

Regarding my other PRs (#897, #898, #899) — they all received comments about A15 being EOL. I don't have an Android 16 device yet and will be staying on Android 15 for the foreseeable future. Is it completely out of the question to get these changes merged?

If Android 15 is fully unsupported, I'll close my PRs and maintain them in my own fork instead.

I have beta-pre16 branch which is the last working branch for a15 and below. I have no plan to release any more version for a15 as it's very much incompatible with a16, and it's a lot of work to maintain for so many android versions. Hope you understand.

@Hayao0819
Copy link
Copy Markdown
Contributor Author

Closing as Android 15 is EOL. I'll maintain these changes in my own fork. Thanks for the clarification!

@Hayao0819 Hayao0819 closed this Apr 11, 2026
@Hayao0819 Hayao0819 deleted the pr/fix-broadcast-storm branch April 11, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants