int event = WIDGET_INSTANCE_EVENT_TERMINATE;
bundle *content_info;
-
if (!wc) {
- _E("could not find widget obj: %s", id); /* LCOV_EXCL_LINE */
- return WIDGET_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+ _E("could not find widget obj: %s, clear amd info", id); /* LCOV_EXCL_LINE */
+ aul_widget_instance_del(handle->classid, id); /* LCOV_EXCL_LINE */
+ return WIDGET_ERROR_NONE; /* LCOV_EXCL_LINE */
}
wc->state = WC_TERMINATED;
if (reason == WIDGET_APP_DESTROY_TYPE_PERMANENT) {
event = WIDGET_INSTANCE_EVENT_DESTROY;
+ aul_widget_instance_del(handle->classid, id);
} else {
ret = __send_update_status(handle->classid, id,
WIDGET_INSTANCE_EVENT_EXTRA_UPDATED, content_info);
}
- aul_widget_instance_del(handle->classid, id);
-
if (content_info)
bundle_free(content_info);
__instance_pause(cxt->provider, cxt->id, send_update);
break;
}
+ LOGD("pause %s", cxt->id);
iter = g_list_next(iter);
}
}
GList *iter = g_list_first(contexts);
__pause_all(send_update);
-
while (iter != NULL) {
widget_context_s *cxt = (widget_context_s *)iter->data;
-
+ iter = g_list_next(iter);
switch (cxt->state) {
case WC_PAUSED:
+ LOGD("destroy %s", cxt->state, cxt->id);
__instance_destroy(cxt->provider, cxt->id, reason, send_update);
break;
}
- iter = g_list_next(iter);
}
}