
We have several places where we create an application policy from an app if possible, and fall back to a generic policy otherwise. Make that more convenient by adding a small helper method. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3170>