diff options
-rw-r--r-- | src/appcore-agent.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/appcore-agent.c b/src/appcore-agent.c index 012a2ea..c16f7e3 100644 --- a/src/appcore-agent.c +++ b/src/appcore-agent.c @@ -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 |