/* call stub create */
appcore_multiwindow_base_instance_run(class_id, id, data);
- data->args = NULL;
- bundle_get_str(b, WIDGET_K_CONTENT_INFO, &content);
- if (content)
- data->content = strdup(content);
-
+ if (appcore_multiwindow_base_instance_find(id)) {
+ data->args = NULL;
+ bundle_get_str(b, WIDGET_K_CONTENT_INFO, &content);
+ if (content)
+ data->content = strdup(content);
+ }
}
static void __control_resume(const char *class_id, const char *id, bundle *b)
free(data->id);
free(data);
__check_empty_instance();
+ aul_widget_write_log(LOG_TAG,
+ "[%s:%d] instance_id(%s)", __FUNCTION__, __LINE__, id);
}
static void __control_change_period(const char *class_id, const char *id,
return 0;
}
+ LOGI("app control operation(%s)", operation);
if (strcmp(operation, "create") == 0)
__control_create(class_id, id, b);
else if (strcmp(operation, "resize") == 0)
EXPORT_API int widget_base_exit(void)
{
- int ret;
+ int ret = 0;
+ int cnt;
appcore_multiwindow_base_exit();
- if (appcore_multiwindow_base_instance_get_cnt() == 0 && __is_permanent) {
+ cnt = appcore_multiwindow_base_instance_get_cnt();
+ if (cnt == 0 && __is_permanent)
ret = aul_notify_exit();
- aul_widget_write_log(LOG_TAG, "[%s:%d] permanent exit : %d",
- __FUNCTION__, __LINE__, ret);
- }
+
+ aul_widget_write_log(LOG_TAG,
+ "[%s:%d] exit : ret(%d), cnt(%d), permanent(%d)",
+ __FUNCTION__, __LINE__, ret, cnt, __is_permanent);
return 0;
}
__instance_drop(instance_h);
} else {
LOGD("%s is created", id);
+ aul_widget_instance_add(class_id, id);
ret = __send_update_status(class_id, id,
WIDGET_INSTANCE_EVENT_CREATE, 0, NULL);
if (ret < 0)
LOGE("Fail to send create status (%d) ", ret);
- aul_widget_instance_add(class_id, id);
-
ret = bundle_get_byte(b, WIDGET_K_PERIOD, (void **)&period,
&size);
if (ret == BUNDLE_ERROR_NONE && *period > 0) {
}
if (!class_id) {
- LOGE("class is is NULL");
+ LOGE("class id is NULL");
set_last_result(WIDGET_ERROR_INVALID_PARAMETER);
return NULL;
}