How are application icon fetched for settings > sound

Some apps packaged as Flatpak sometimes appear with generic icons or incorrect names in the Settings > Sounds screen.

What should an app developer pay attention to in order for their app to appear correctly in the Settings > Sounds screen?

Related to:

Hi,

A similar issue was recently fixed in Showtime: general: Set the binary name (!73) · Merge requests · GNOME / Video Player · GitLab

Settings uses GAppInfo for the name and icons. See panels/sound/cc-stream-row.c · main · GNOME / Settings · GitLab

On Linux, the icon is extracted from the desktop file. See gio/gdesktopappinfo.c · main · GNOME / GLib · GitLab