static void show_ime_selector_notification (void);
#endif
static void set_language_and_locale (void);
+static void app_control_launch (const char *app_id);
/////////////////////////////////////////////////////////////////////////////
// Declaration of internal variables.
{
// Launch IME List application; e.g., org.tizen.inputmethod-setting-list
int ret;
- app_control_h app_control;
char *app_id = NULL;
#ifdef HAVE_PKGMGR_INFO
pkgmgrinfo_appinfo_filter_h handle;
#endif
if (app_id) {
- ret = app_control_create (&app_control);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGW ("app_control_create returned %d\n", ret);
- free(app_id);
- return;
- }
-
- ret = app_control_set_operation (app_control, APP_CONTROL_OPERATION_DEFAULT);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGW ("app_control_set_operation returned %d\n", ret);
- app_control_destroy(app_control);
- free(app_id);
- return;
- }
-
- ret = app_control_set_app_id (app_control, app_id);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGW ("app_control_set_app_id returned %d\n", ret);
- app_control_destroy(app_control);
- free(app_id);
- return;
- }
-
- ret = app_control_send_launch_request (app_control, NULL, NULL);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGW ("app_control_send_launch_request returned %d, app_id=%s\n", ret, app_id);
- app_control_destroy(app_control);
- free(app_id);
- return;
- }
-
- app_control_destroy (app_control);
- SECURE_LOGD ("Launch %s\n", app_id);
+ app_control_launch (app_id);
free(app_id);
}
else {
{
// Launch IME Selector application; e.g., org.tizen.inputmethod-setting-selector
int ret;
- app_control_h app_control;
char *app_id = NULL;
#ifdef HAVE_PKGMGR_INFO
pkgmgrinfo_appinfo_filter_h handle;
#endif
if (app_id) {
- ret = app_control_create (&app_control);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGW ("app_control_create returned %d\n", ret);
- free(app_id);
- return;
- }
-
- ret = app_control_set_operation (app_control, APP_CONTROL_OPERATION_DEFAULT);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGW ("app_control_set_operation returned %d\n", ret);
- app_control_destroy(app_control);
- free(app_id);
- return;
- }
-
- ret = app_control_set_app_id (app_control, app_id);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGW ("app_control_set_app_id returned %d\n", ret);
- app_control_destroy(app_control);
- free(app_id);
- return;
- }
-
- ret = app_control_send_launch_request(app_control, NULL, NULL);
- if (ret != APP_CONTROL_ERROR_NONE) {
- LOGW ("app_control_send_launch_request returned %d, app_id=%s\n", ret, app_id);
- app_control_destroy(app_control);
- free(app_id);
- return;
- }
-
- app_control_destroy(app_control);
- SECURE_LOGD ("Launch %s\n", app_id);
+ app_control_launch (app_id);
free(app_id);
}
else {