We need to protect session connection while screen-reader is alive.
If session connection is released, then vanished callback of at-spi-bus-launcher
is called and vanished calllback disables 'IsEnabled' property.
[GBusNameVanishedCallback]
https://www.freedesktop.org/software/gstreamer-sdk/data/docs/latest/gio/gio-Watching-Bus-Names.html#g-bus-watch-name
Change-Id: I8c91caf76cace65f1ee32acf7d5435e29a365fe1
bool update_language_list;
//Set by dbus
+ Eldbus_Connection *conn;
Eldbus_Proxy *proxy;
char **last_tokens;
char *available_requests;
Service_Data *sd = (Service_Data*)data;
elm_init(0, NULL);
+
+ /* allocate SESSION connection here to make alive always
+ if connection is released, then vanished callback is called on
+ at-spi-bus-launcher side. and it disables 'IsEnabled' property */
+ eldbus_init();
+ sd->conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
+
atspi_init();
screen_reader_create_service(sd);
DEBUG("[START] init direct reading");
screen_reader_terminate_service(sd);
DEBUG("libatspi terminated");
atspi_exit();
+
+ eldbus_connection_unref(sd->conn);
+ eldbus_shutdown();
+
elm_exit();
DEBUG("screen reader terminated");