cgroup_make_subdir(STC_CGROUP_NETWORK, STC_BACKGROUND_CGROUP_NAME,
NULL);
- cgroup_write_node_uint32(BACKGROUND_CGROUP_NETWORK,
- CLASSID_FILE_NAME, STC_BACKGROUND_APP_CLASSID);
-
/* create foreground cgroup directory */
cgroup_make_subdir(STC_CGROUP_NETWORK, STC_FOREGROUND_CGROUP_NAME,
NULL);
FREE(app_key.app_id);
}
-static guint __get_background_state(void)
-{
- return g_system->background_state;;
-}
-
-static void __set_background_state(guint state)
-{
- g_system->background_state = state;
-}
-
static gboolean __processes_tree_foreach_background(gpointer key,
gpointer value,
gpointer data)
stc_process_key_s *proc_key = (stc_process_key_s *)key;
stc_app_key_s *app_key = (stc_app_key_s *)data;
- if (g_system->background_state)
- place_pids_to_net_cgroup(proc_key->pid, STC_BACKGROUND_APP_ID);
- else
- place_pids_to_net_cgroup(proc_key->pid, app_key->app_id);
+ place_pids_to_net_cgroup(proc_key->pid, app_key->app_id);
return FALSE;
}
if (proc_lookup->ground != ground)
proc_lookup->ground = ground;
- if (ground == STC_APP_STATE_BACKGROUND && __get_background_state())
- place_pids_to_net_cgroup(proc_key.pid, STC_BACKGROUND_APP_ID);
- else
- place_pids_to_net_cgroup(proc_key.pid, app_key.app_id);
+ place_pids_to_net_cgroup(proc_key.pid, app_key.app_id);
return ret;
}
value.classid = STC_UNKNOWN_CLASSID;
if (value.classid == STC_BACKGROUND_APP_CLASSID) {
- __set_background_state(TRUE); //LCOV_EXCL_LINE
- __vconf_set_int(VCONFKEY_STC_BACKGROUND_STATE, g_system->background_state); //LCOV_EXCL_LINE
+ g_system->background_state = TRUE; //LCOV_EXCL_LINE
+ __vconf_set_int(VCONFKEY_STC_BACKGROUND_STATE, TRUE); //LCOV_EXCL_LINE
__process_update_background(); //LCOV_EXCL_LINE
}
};
if (!strcmp(key.app_id, STC_BACKGROUND_APP_ID)) {
- __set_background_state(FALSE); //LCOV_EXCL_LINE
- __vconf_set_int(VCONFKEY_STC_BACKGROUND_STATE, g_system->background_state); //LCOV_EXCL_LINE
+ g_system->background_state = FALSE; //LCOV_EXCL_LINE
+ __vconf_set_int(VCONFKEY_STC_BACKGROUND_STATE, FALSE); //LCOV_EXCL_LINE
__process_update_background(); //LCOV_EXCL_LINE
}