Fix AlertManeuver success result in case of UNSUPPORTED_RESOURCE#1567
Fix AlertManeuver success result in case of UNSUPPORTED_RESOURCE#1567AKalinich-Luxoft wants to merge 1 commit intosmartdevicelink:developfrom
Conversation
|
@anosach-luxoft, @AByzhynar, @dev-gh, @VProdanov please review |
| if (mobile_apis::Result::UNSUPPORTED_RESOURCE == result_code) { | ||
| // According to APPLINK-19582 should be success:true in this case | ||
| return true; | ||
| } |
There was a problem hiding this comment.
@AKalinich-Luxoft
I think that is not a good approach to add more if() as this spreads special cases across different places. I propose to do changes similar to #1562 so then logic may be extended to cover specific cases for this particular command.
Also I suggest to move within these overridden method logic from lines 201-209
| MergeInfos(navigation_alert_info, info_navi_, tts_alert_info, info_tts_); | ||
|
|
||
| if (mobile_apis::Result::UNSUPPORTED_RESOURCE == result_code) { | ||
| // According to APPLINK-19582 should be success:true in this case |
There was a problem hiding this comment.
@AKalinich-Luxoft Remove JIRA task from comment. It is prohibited to specify such things in OpenSDL.
efb2f68 to
553abdd
Compare
| return result; | ||
| tts_alert_info.result_code = hmi_apis::Common_Result::WARNINGS; | ||
| } else if (IsResultCodeUnsupported(navigation_alert_info, tts_alert_info)) { | ||
| return true; |
There was a problem hiding this comment.
@VProdanov I think here is no difference because result will be returned as true on the next line in this case
There was a problem hiding this comment.
@AKalinich-Luxoft yes, its for consistency..
| */ | ||
| bool PrepareResultForMobileResponse( | ||
| ResponseInfo& navigation_alert_info, | ||
| ResponseInfo& tts_alert_info) const OVERRIDE; |
20a8cd4 to
75e8ed3
Compare
| * interface that returns third response | ||
| * @return true if overall result code is UNSUPPORTED_RESOURCE otherwise false | ||
| */ | ||
| bool IsResultCodeUnsupported(const ResponseInfo& first, |
There was a problem hiding this comment.
@AKalinich-Luxoft I would rename first -> first_iface_response and so on...
75e8ed3 to
9b902f4
Compare
| */ | ||
| bool PrepareResultForMobileResponse(ResponseInfo& out_first, | ||
| ResponseInfo& out_second) const; | ||
| virtual bool PrepareResultForMobileResponse(ResponseInfo& out_first, |
There was a problem hiding this comment.
@AKalinich-Luxoft Please rename parameters like you did in IsResultCodeUnsupported(const ResponseInfo& first_iface_response...
| * @return resulting code for sending to mobile application. | ||
| */ | ||
| mobile_apis::Result::eType PrepareResultCodeForResponse( | ||
| virtual mobile_apis::Result::eType PrepareResultCodeForResponse( |
There was a problem hiding this comment.
@AKalinich-Luxoft Please rename parameters like you did in IsResultCodeUnsupported(const ResponseInfo& first_iface_response...
9b902f4 to
9e2ce85
Compare
Fixed AlertManeuver success result in case of UNSUPPORTED_RESOURCE. The problem was that SDL does not check success result in this specific case. In this commit: - Added check for UNSUPPORTED_RESOURCE case - All specific checks were moved to PrepareResultForMobileResponse/PrepareResultCodeForResponse function - PrepareResultForMobileResponse is currently virtual
9e2ce85 to
d92f767
Compare
|
Can one of the admins verify this patch? |
2 similar comments
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
Fixed
AlertManeuversuccess result in case ofUNSUPPORTED_RESOURCE.The problem was that SDL does not check success result in this specific case.
In this pull request:
UNSUPPORTED_RESOURCEcasePrepareResultForMobileResponsefunctionPrepareResultForMobileResponseis currently virtual