fix launch_on_event failure. 21/61921/2 accepted/tizen/common/20160316.160019 accepted/tizen/ivi/20160312.015400 accepted/tizen/mobile/20160312.015310 accepted/tizen/tv/20160312.015327 accepted/tizen/wearable/20160312.015345 submit/tizen/20160311.221215
authorjongmyeongko <jongmyeong.ko@samsung.com>
Fri, 11 Mar 2016 07:39:47 +0000 (16:39 +0900)
committerjongmyeongko <jongmyeong.ko@samsung.com>
Fri, 11 Mar 2016 07:47:10 +0000 (16:47 +0900)
And, remove gathering appinfo for globalappuser (it's not needed)

Change-Id: I9752e8b8b47ea3dc28258b96b7e64f443b74321c
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
CMakeLists.txt
src/esd_main.c

index 5d620f0..6d1c5e7 100644 (file)
@@ -28,7 +28,7 @@ ENDFOREACH(flag)
 
 ## Additional flag
 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -Wall")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -Wall -Werror")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
 ## Linker flags
index 1632334..9d9af13 100644 (file)
@@ -729,9 +729,10 @@ static void __esd_event_launch_with_appid(gpointer data, gpointer user_data)
        char event_uri[1024];
        bundle *b;
 
-       _D("launch_on_event: app_id(%s), event_name(%s)", app_id, eep->event_name);
+       _D("launch_on_event: app_id(%s), event_name(%s), uid(%d)",
+                       app_id, eep->event_name, uid);
 
-       if (aul_app_is_running_for_uid(app_id, uid)) {
+       if (!aul_app_is_running_for_uid(app_id, uid)) {
                snprintf(event_uri, sizeof(event_uri), "event://%s", eep->event_name);
                b = bundle_dup(eep->event_data);
                appsvc_set_operation(b, APPSVC_OPERATION_LAUNCH_ON_EVENT);
@@ -743,7 +744,7 @@ static void __esd_event_launch_with_appid(gpointer data, gpointer user_data)
 
                bundle_free(b);
        } else {
-               _D("already is running");
+               _D("already is running or launch failed");
        }
 }
 
@@ -1529,7 +1530,6 @@ static void __esd_on_name_lost(GDBusConnection *connection,
 static int __esd_before_loop(void)
 {
        int ret = 0;
-       uid_t uid = 0;
        GError *error = NULL;
        guint owner_id = 0;
 
@@ -1656,19 +1656,6 @@ static int __esd_before_loop(void)
 #endif
 
        event_launch_table = g_hash_table_new(g_str_hash, g_str_equal);
-
-       _I("get event launch list");
-
-       /* get global user info */
-       uid = GLOBAL_USER;
-       ret = pkgmgrinfo_appinfo_get_usr_installed_list(__esd_add_appinfo_handler, uid, &uid);
-       if (ret < 0) {
-               _E("failed to get global-app list (%d)", ret);
-               return ES_R_ERROR;
-       }
-
-       __esd_launch_table_print_items();
-
        trusted_busname_table = g_hash_table_new(g_str_hash, g_str_equal);
 
        /* gdbus setup for method call */