g_hash_table_iter_init(&iter, s_info.widget_table);
while (g_hash_table_iter_next(&iter, &key, &value)) {
widget_instance_info = (struct widget_info *)value;
- if (widget_instance_info->restart &&
- (strcmp(widget_instance_info->widget_id, widget_id) == 0)) {
- target_pid = widget_instance_info->pid;
- break;
+ if (strcmp(widget_instance_info->widget_id, widget_id) == 0) {
+ if (widget_instance_info->restart) {
+ target_pid = widget_instance_info->pid;
+ LOGW("Prepare restart (%s)(%d)", widget_id, target_pid);
+ break;
+ } else {
+ LOGW("There is no restart event for (%s)",
+ widget_instance_info->instance_id);
+ }
}
}
if (target_pid == 0) {
- LOGD("can not find widget(%s)", widget_id);
+ LOGW("can not find widget(%s)", widget_id);
return 0;
}
info->no_response_count++;
LOGW("Widget is not responding(%d) !! %s(%d)",
info->no_response_count, instance_id, info->pid);
+
aul_terminate_pid(info->pid);
}
__launch_instance();
widget_instance_info->restart = true;
}
aul_terminate_pid_async(target_pid);
- LOGD("Widget __handle_restart_widget_request id : %s, pid : %d",
+ LOGW("Widget __handle_restart_widget_request id : %s, pid : %d",
widget_id, target_pid);
aul_widget_write_log(LOG_TAG, "[%s:%d] %s, targetpid : %d",
__FUNCTION__, __LINE__, widget_id, target_pid);
tbm_obj = elm_object_part_content_get(info->layout, "tbm,widget");
if (!tbm_obj) {
- LOGE("widget(%s) object is invalid", info->instance_id);
+ LOGE("widget(%s)(%d) object is invalid",
+ info->instance_id, info->pid);
continue;
}
if (info->is_created) {
ret = __instance_pause(info);
if (ret < 0) {
- LOGE("Fail to pause the widget(%s):(%d)",
- info->instance_id, ret);
+ LOGE("Fail to pause the widget(%s)(%d):(%d)",
+ info->instance_id, info->pid, ret);
}
} else {
item = __create_pending_item("pause", 0, 0);
{
struct widget_info *info = data;
- if (__obj_is_visible(layout)) {
- if (info->pid < 0) {
- info->restart = true;
- LOGD("restart! %s", info->widget_id);
- __display_loading_text(info);
- __restart_terminated_widget(info->widget_id);
- }
- }
+ if (!__obj_is_visible(layout) || info->pid > 0)
+ return;
+
+ info->restart = true;
+ LOGW("restart! %s", info->instance_id);
+ __display_loading_text(info);
+ __restart_terminated_widget(info->widget_id);
+
}
/* LCOV_EXCL_STOP */