std::shared_ptr<const ServiceApplicationInfoList> service_application_list =
std::static_pointer_cast<const ServiceApplicationInfoList>(
parser_->GetManifestData(app_keys::kServiceApplicationKey));
+ std::shared_ptr<const WidgetApplicationInfoList> widget_application_list =
+ std::static_pointer_cast<const WidgetApplicationInfoList>(
+ parser_->GetManifestData(app_keys::kWidgetApplicationKey));
// mandatory check
- if (!ui_application_list && !service_application_list) {
- LOG(ERROR) << "UI Application or Service Application "
+ if (!ui_application_list && !service_application_list &&
+ !widget_application_list) {
+ LOG(ERROR) << "UI Application or Service Application or Widget Application "
"are mandatory and has not been found.";
return false;
}
if (ui_application_list) {
manifest->mainapp_id =
strdup(ui_application_list->items[0].ui_info.appid().c_str());
- } else {
+ } else if (service_application_list) {
manifest->mainapp_id =
strdup(service_application_list->items[0].sa_info.appid().c_str());
+ } else if (widget_application_list) {
+ manifest->mainapp_id =
+ strdup(widget_application_list->items[0].widget_info.appid().c_str());
}
return true;
}