SECURE_LOGD("[__SUSPEND__] pid: %d", pid);
__app_send_raw_with_noreply(pid, APP_WAKE, (unsigned char *)&dummy, sizeof(int));
}
-
+*/
static void __set_fg_flag(int cpid, int flag, gboolean force)
{
int lpid = app_group_get_leader_pid(cpid);
GHashTableIter iter;
gpointer key, value;
+/* BG management
int bg_category = 0x00;
-
+*/
g_hash_table_iter_init(&iter, app_group_hash);
while (g_hash_table_iter_next(&iter, &key, &value)) {
GList *list = (GList*) value;
appid = _status_app_get_appid_bypid(ac->pid);
ai = appinfo_find(getuid(), appid);
pkgid = appinfo_get_value(ai, AIT_PKGID);
+/* BG management
bg_category = (bool)appinfo_get_value(ai, AIT_BG_CATEGORY);
-
+*/
if (flag) {
_D("send_signal FG %s", appid);
pkgid,
STATUS_FOREGROUND,
APP_TYPE_UI);
+/* BG management
if (!bg_category)
_status_find_service_apps(ac->pid, STATUS_VISIBLE, __prepare_to_wake_services, false);
+*/
} else {
_D("send_signal BG %s", appid);
aul_send_app_status_change_signal(ac->pid, appid,
pkgid,
STATUS_BACKGROUND,
APP_TYPE_UI);
+/* BG management
if (!bg_category)
_status_find_service_apps(ac->pid, STATUS_BG, __prepare_to_suspend_services, true);
+*/
}
ac->fg = flag;
}
}
}
}
-*/
static gboolean __is_visible(int cpid)
{
if (last_ac->wid != 0 || status == STATUS_VISIBLE || force == TRUE) {
if (__is_visible(pid)) {
- //__set_fg_flag(pid, 1, force);
+ __set_fg_flag(pid, 1, force);
if (!ac->group_sig && GPOINTER_TO_INT(key) != pid) {
char *appid = NULL;
const char *pkgid = NULL;
aul_send_app_group_signal(GPOINTER_TO_INT(key), pid, pkgid);
ac->group_sig = 1;
}
- } /*else
- __set_fg_flag(pid, 0, force);*/
+ } else
+ __set_fg_flag(pid, 0, force);
}
return 0;
}
SECURE_LOGD("caller process & callee process is same.[%s:%d]", appid, pid);
pid = -ELOCALLAUNCH_ID;
} else {
+ aul_send_app_resume_request_signal(pid, appid, pkg_id, component_type);
if ((ret = __nofork_processing(cmd, pid, kb, fd)) < 0)
pid = ret;
else
bundle_add(kb, AUL_K_INTERNAL_POOL, process_pool);
bundle_add(kb, AUL_K_COMP_TYPE, component_type);
pid = app_agent_send_cmd(caller_uid, cmd, kb);
+ if (pid > 0)
+ aul_send_app_launch_request_signal(pid, appid, pkg_id, component_type);
}
if (pid > 0) {
for (i = 0, iter = r_app_info_list; i < n; i++) {
info_t = (r_app_info_t *)iter->data;
+ aul_send_app_terminate_request_signal(info_t->pid, NULL, NULL, NULL);
__send_to_sigkill(info_t->pid);
iter = g_slist_next(iter);
r_app_info_list = g_slist_remove(r_app_info_list, info_t);
__remove_item_running_list(pid, getuid());
_status_remove_app_info_list(pid, getuid());
+ aul_send_app_terminated_signal(pid);
if (restart)
_start_app_local(getuid(), appid);
int ret;
int dummy;
char *appid;
+ const char *pkgid = NULL;
+ const char *type = NULL;
+ const struct appinfo *ai = NULL;
if (pkg_name == NULL)
return -1;
return -1;
}
+ ai = appinfo_find(cr->uid, appid);
+ if (ai) {
+ pkgid = appinfo_get_value(ai, AIT_PKGID);
+ type = appinfo_get_value(ai, AIT_COMP);
+ }
+
+ if (ai && (cmd == APP_RESUME_BY_PID || cmd == APP_PAUSE_BY_PID))
+ aul_send_app_resume_request_signal(pid, appid, pkgid, type);
+ else
+ aul_send_app_terminate_request_signal(pid, appid, pkgid, type);
+
switch (cmd) {
case APP_RESUME_BY_PID:
ret = _resume_app(pid, clifd);