0, 0, req, NULL) < 0)
return -1;
} else if (caller_appid && strcmp(comp_type, APP_TYPE_WIDGET) == 0) {
+ status = _app_status_get_status(handle->app_status);
if (_noti_send(AMD_NOTI_MSG_LAUNCH_PREPARE_WIDGET,
- 0, 0, req, NULL) < 0)
+ handle->pid, status, req, NULL) < 0)
return -1;
} else if (strcmp(comp_type, APP_TYPE_COMPONENT_BASED) == 0) {
status = _app_status_get_status(handle->app_status);
/**
* @brief Definition for the notification message: Preparing the launch request that is launching the Widget application is.
* @details If the return value is less than AMD_NOTI_STOP, the launch request is stopped. And then, the caller process gets a negative error value.
- * @details Input: arg3(amd_request_h) The request handle.\n
+ * @details Input: arg1(int) The process ID.(Since Tizen 6.0)\n
+ * Input: arg2(int) The status of the application.(Since Tizen 6.0)\n
+ * Input: arg3(amd_request_h) The request handle.\n
* @since_tizen 5.5
*
* @see __prepare_starting_app()
return count;
}
-static int __widget_verify_cmd(amd_request_h req)
+static int __widget_verify_cmd(amd_request_h req, int pid, int status)
{
bundle *kb = amd_request_get_bundle(req);
const char *command;
if (strcmp(command, "create") == 0)
return 0;
+ if (status == STATUS_DYING || status == -1) {
+ LOGE("Invalid request(%s). pid(%d), status(%d)",
+ command, pid, status);
+ error_desc = "invalid status";
+ goto error;
+ }
+
instance_id = bundle_get_val(kb, AUL_K_WIDGET_INSTANCE_ID);
if (instance_id == NULL) {
/*
static int __on_launching_widget(const char *msg, int arg1, int arg2,
void *arg3, bundle *data)
{
+ int pid = arg1;
+ int status = arg2;
amd_request_h req = arg3;
- if (__widget_verify_cmd(req) < 0)
+ if (__widget_verify_cmd(req, pid, status) < 0)
return -1;
return 0;