Remove unnecessary code 49/85549/1 accepted/tizen/3.0/ivi/20161011.053503 accepted/tizen/3.0/mobile/20161015.032232 accepted/tizen/3.0/tv/20161016.003357 accepted/tizen/3.0/wearable/20161015.080316 accepted/tizen/common/20160829.135822 accepted/tizen/common/20160830.150112 accepted/tizen/ivi/20160830.061159 accepted/tizen/mobile/20160830.060920 accepted/tizen/tv/20160830.061020 accepted/tizen/wearable/20160830.061114 submit/tizen/20160829.010716 submit/tizen/20160830.010724 submit/tizen_3.0_ivi/20161010.000000 submit/tizen_3.0_ivi/20161010.000010 submit/tizen_3.0_mobile/20161015.000000 submit/tizen_3.0_tv/20161015.000000 submit/tizen_3.0_wearable/20161015.000000
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 25 Aug 2016 23:55:17 +0000 (08:55 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 25 Aug 2016 23:55:17 +0000 (08:55 +0900)
Change-Id: Ia8dc52ef3a7986fa191970cb2dd3671c75ea2017
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/appcore-agent.c

index 012a2ea..c16f7e3 100644 (file)
@@ -295,47 +295,6 @@ static int appcore_agent_flush_memory(void)
 /* LCOV_EXCL_STOP */
 
 /* LCOV_EXCL_START */
-static int _appcore_agent_request_to_suspend(int pid)
-{
-#ifdef _APPFW_FEATURE_BACKGROUND_MANAGEMENT
-       GError *err = NULL;
-
-       if (bus == NULL) {
-               bus = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
-               if (bus == NULL) {
-                       _ERR("g_bus_get_sync() is failed: %s", err->message);
-                       g_error_free(err);
-                       return -1;
-               }
-       }
-
-       if (g_dbus_connection_emit_signal(bus,
-                                       NULL,
-                                       APPFW_SUSPEND_HINT_PATH,
-                                       APPFW_SUSPEND_HINT_INTERFACE,
-                                       APPFW_SUSPEND_HINT_SIGNAL,
-                                       g_variant_new("(i)", pid),
-                                       &err) == FALSE) {
-               _ERR("g_dbus_connection_emit_signal() is failed: %s",
-                                       err->message);
-               g_error_free(err);
-               return -1;
-       }
-
-       if (g_dbus_connection_flush_sync(bus, NULL, &err) == FALSE) {
-               _ERR("g_dbus_connection_flush_sync() is failed: %s",
-                                       err->message);
-               g_error_free(err);
-               return -1;
-       }
-
-       _DBG("[__SUSPEND__] Send suspend hint, pid: %d", pid);
-#endif
-       return 0;
-}
-/* LCOV_EXCL_STOP */
-
-/* LCOV_EXCL_START */
 static void __prepare_to_suspend(void *data)
 {
 #ifdef _APPFW_FEATURE_BACKGROUND_MANAGEMENT
@@ -345,7 +304,6 @@ static void __prepare_to_suspend(void *data)
        if (ac && !ac->allowed_bg && !ac->suspended_state) {
                _DBG("[__SUSPEND__]");
                __sys_do(ac, &suspend, SE_SUSPENDED_STATE);
-               _appcore_agent_request_to_suspend(getpid()); /* send dbus signal to resourced */
                ac->suspended_state = true;
        }
 #endif