const struct appinfo *ai;
uid_t target_uid = _request_get_target_uid(req);
app_status_h app_status;
+ int cmd;
if (pid_str == NULL)
return -1;
pkgid = _appinfo_get_value(ai, AIT_PKGID);
type = _appinfo_get_value(ai, AIT_COMPTYPE);
- switch (_request_get_cmd(req)) {
+ cmd = _request_get_cmd(req);
+ switch (cmd) {
case APP_RESUME_BY_PID:
case APP_RESUME_BY_PID_ASYNC:
case APP_PAUSE_BY_PID:
break;
}
- switch (_request_get_cmd(req)) {
+ switch (cmd) {
case APP_RESUME_BY_PID_ASYNC:
_request_send_result(req, 0);
ret = _resume_app(pid, req);
ret = -1;
}
+ if (cmd == APP_RESUME_BY_PID || cmd == APP_RESUME_BY_PID_ASYNC ||
+ cmd == APP_PAUSE_BY_PID) {
+ if (_app_status_get_app_type(app_status) == AT_UI_APP &&
+ _app_status_get_status(app_status) != STATUS_VISIBLE &&
+ ret == 0)
+ __launch_add_fgmgr(pid);
+ }
+
+
return ret;
}