-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix response to SetGlobalProperties in case of UNSUPPORTED TTS #1574
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,6 +276,30 @@ void SetGlobalPropertiesRequest::on_event(const event_engine::Event& event) { | |
} | ||
} | ||
|
||
bool SetGlobalPropertiesRequest::PrepareResultForMobileResponse( | ||
ResponseInfo& ui_info, ResponseInfo& tts_info) const { | ||
const bool result = | ||
CommandRequestImpl::PrepareResultForMobileResponse(ui_info, tts_info); | ||
if (ui_info.is_ok && tts_info.is_unsupported_resource) { | ||
return true; | ||
} | ||
return result; | ||
} | ||
|
||
mobile_apis::Result::eType | ||
SetGlobalPropertiesRequest::PrepareResultCodeForResponse( | ||
const ResponseInfo& ui_info, const ResponseInfo& tts_info) { | ||
if (ui_info.is_ok && tts_info.is_unsupported_resource) { | ||
return mobile_apis::Result::WARNINGS; | ||
} | ||
if (HmiInterfaces::STATE_AVAILABLE == tts_info.interface_state && | ||
tts_info.is_unsupported_resource) { | ||
tts_response_info_ = "Unsupported phoneme type sent in a prompt"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pvvasilev please remove this assignment. According to APPLINK-19591 SDL should transfer info string received from HMI response but not generate it by itself. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AKalinich-Luxoft I do not see any mention of this in the cited ticket. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pvvasilev it's not mentioned but it should. Please also look at related requirement APPLINK-31653 which contains more detailed description. I hope it's applicable for all RPCs which contains There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AKalinich-Luxoft Again I do not see any mention of this. Please give me an exact requirement specifying this. Otherwise I do not agree with you. Also I think these requirements you are citing are not for the correct project. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pvvasilev these requirements are applicable for GENIVI & Ford-Specific (specified in Commitment field of ticket). In cited APPLINK-31653:
I think it is exactly this case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @this is not the same case. The case you are referring to is the |
||
return mobile_apis::Result::WARNINGS; | ||
} | ||
return CommandRequestImpl::PrepareResultCodeForResponse(ui_info, tts_info); | ||
} | ||
|
||
bool SetGlobalPropertiesRequest::PrepareResponseParameters( | ||
mobile_apis::Result::eType& result_code, std::string& info) { | ||
LOG4CXX_AUTO_TRACE(logger_); | ||
|
@@ -287,17 +311,6 @@ bool SetGlobalPropertiesRequest::PrepareResponseParameters( | |
HmiInterfaces::HMI_INTERFACE_TTS); | ||
const bool result = | ||
PrepareResultForMobileResponse(ui_properties_info, tts_properties_info); | ||
if (result && | ||
(HmiInterfaces::STATE_AVAILABLE == tts_properties_info.interface_state) && | ||
(tts_properties_info.is_unsupported_resource)) { | ||
result_code = mobile_apis::Result::WARNINGS; | ||
tts_response_info_ = "Unsupported phoneme type sent in a prompt"; | ||
info = MergeInfos(tts_properties_info, | ||
tts_response_info_, | ||
ui_properties_info, | ||
ui_response_info_); | ||
return result; | ||
} | ||
result_code = | ||
PrepareResultCodeForResponse(ui_properties_info, tts_properties_info); | ||
info = MergeInfos(tts_properties_info, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvvasilev Maybe
if (ui_info.is_ok && tts_info.is_unsupported_resource) {
return true;
}
return CommandRequestImpl::PrepareResultForMobileResponse(ui_info, tts_info);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VProdanov No. The
ui_info
andtts_info
are initialized in theCommandRequestImpl::PrepareResultForMobileResponse
call.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok