From: Shinwoo Kim Date: Tue, 16 May 2017 05:22:27 +0000 (+0900) Subject: Convey launching condition to screen-reader X-Git-Tag: accepted/tizen/unified/20170519.200903~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fat-spi2-core.git;a=commitdiff_plain;h=4a435a0629752f9ee5a8a1a86566c3e48029dd20 Convey launching condition to screen-reader The screen-reader reads "Screen reader (TTS) on" when the screen-reader launches. It is not necessary to read this information for the screen-reader launching at booting time. It is necessary only if the screen-reader is launched by the Vconf value change from the Settings application. Change-Id: I73cb17be6c6b561d77ed2f6d7226a21896f62e1a --- diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index db1db5c..89860b6 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -604,7 +604,7 @@ gsettings_key_changed (GSettings *gsettings, const gchar *key, void *user_data) } static gboolean -_launch_screen_reader(gpointer user_data) +_launch_screen_reader(gpointer user_data, gboolean by_vconf_change) { A11yBusLauncher *bl = user_data; LOGD("Launching screen reader"); @@ -619,6 +619,15 @@ _launch_screen_reader(gpointer user_data) LOGD("Can't create bundle"); return FALSE; } + + if (by_vconf_change) + { + if (bundle_add_str(kb, "by_vconf_change", "yes") != BUNDLE_ERROR_NONE) + { + LOGD("Can't add information to bundle"); + } + } + int operation_error = appsvc_set_operation(kb, APP_CONTROL_OPERATION_SCREEN_READ); LOGD("appsvc_set_operation: %i", operation_error); @@ -649,7 +658,7 @@ _launch_screen_reader_repeat_until_success(gpointer user_data) { return FALSE; } - gboolean ret = _launch_screen_reader(user_data); + gboolean ret = _launch_screen_reader(user_data, FALSE); if (ret) { @@ -727,7 +736,7 @@ void screen_reader_cb(keynode_t *node, void *user_data) if (!bl->screen_reader_needed && (bl->pid > 0)) _terminate_screen_reader(bl); else if (bl->screen_reader_needed && (bl->pid <= 0)) - _launch_screen_reader(bl); + _launch_screen_reader(bl, TRUE); } int