diff --git a/src/camera.c b/src/camera.c index 6acfe6bb4..2f5a6ead0 100644 --- a/src/camera.c +++ b/src/camera.c @@ -76,9 +76,11 @@ query_permission_sync (Request *request) { Permission permission; const char *app_id; + const char *permission_query_app_id; gboolean allowed; app_id = (const char *)g_object_get_data (G_OBJECT (request), "app-id"); + permission_query_app_id = app_id; permission = get_permission_sync (app_id, PERMISSION_TABLE, PERMISSION_DEVICE_CAMERA); if (permission == PERMISSION_ASK || permission == PERMISSION_UNSET) @@ -110,6 +112,8 @@ query_permission_sync (Request *request) { title = g_strdup (_("Allow app to Use the Camera?")); body = g_strdup (_("An app wants to access camera devices.")); + if (xdp_app_info_is_host (request->app_info)) + permission_query_app_id = ""; } impl_request = xdp_dbus_impl_request_proxy_new_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (access_impl)), @@ -126,7 +130,7 @@ query_permission_sync (Request *request) if (!xdp_dbus_impl_access_call_access_dialog_sync (access_impl, request->id, - app_id, + permission_query_app_id, "", title, "",