-
Notifications
You must be signed in to change notification settings - Fork 244
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
Add CloseApplication RPC #2948
Add CloseApplication RPC #2948
Conversation
96c201d
to
d8d34c8
Compare
d8d34c8
to
bd5b5d7
Compare
...c_plugin/include/sdl_rpc_plugin/commands/hmi/basic_communication_close_application_request.h
Outdated
Show resolved
Hide resolved
@jacobkeeler This PR contains additional Request\Resoponse to HMI. |
@LuxoftAKutsan does this PR follow option 2 of smartdevicelink/sdl_requirements#111 ? |
@kshala-ford It would appear so. @LuxoftAKutsan My only reservation with using |
@kshala-ford this PR follow option 2 from smartdevicelink/sdl_requirements#111. @jacobkeeler From my perspective Adding
Now we have 2 options :
Also it is not clear for me difference between sdl_hmi and generic_hmi. Why do we need both in opensource? |
@LuxoftAKutsan I believe that the documentation would need to be updated in either case, because the HMI documentation doesn't describe the HMI's behavior for each HMI level. As stated, it doesn't seem like
In addition, it seems to me that The |
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.
Not sure, but I suppose that merging this PR will affect existing test scripts ( Smoke and delivered features).
Existing scripts probably will expect ActivateApp(None) in case if the application will be deactivated.
src/components/application_manager/src/state_controller_impl.cc
Outdated
Show resolved
Hide resolved
src/components/application_manager/src/state_controller_impl.cc
Outdated
Show resolved
Hide resolved
src/components/application_manager/src/state_controller_impl.cc
Outdated
Show resolved
Hide resolved
...lication_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/close_application_request.cc
Outdated
Show resolved
Hide resolved
MessageHelper::HMIToMobileResult(hmi_result); | ||
bool success = PrepareResultForMobileResponse( | ||
hmi_result, HmiInterfaces::HMI_INTERFACE_AppService); | ||
if (success) { |
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.
Should part of the success be to check if the HMI also sent an OnAppDeactivated? Before setting the app state to HMI_LEVEL none, should the state be checked to see if it is in limited or background?
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.
I think OnExitApplication would be more appropriate, but I don't think it's necessary for the HMI to send this message, the response should be enough.
(*bc_activate_app_request)[strings::params][strings::correlation_id] | ||
.asInt(); | ||
return corr_id; | ||
const uint32_t corr_id = |
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.
Why the change to uint32 and then recast to int64?
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.
It seems this was originally chosen for the return value of SendBCActivateApp
to allow for an error response of -1
, correlation IDs use uint32_t. I could remove these casts, but it was being done implicitly before anyway.
src/components/policy/policy_external/include/policy/policy_table/enums.h
Outdated
Show resolved
Hide resolved
src/components/policy/policy_regular/include/policy/policy_table/enums.h
Outdated
Show resolved
Hide resolved
Co-Authored-By: JackLivio <[email protected]>
e731952
to
ca57f92
Compare
Implements #1931
This PR is ready for review.
Risk
This PR makes minor API changes.
Testing Plan
Create base ATF tests for new RPC
Summary
Add new
CloseApplication
RPC to Mobile and HMI interfaces.Changelog
Enhancements
CloseApplication
RPC to Mobile and HMI interfaces.CLA