-
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
Re-order rai logic for plugins #3526
Conversation
@@ -558,6 +558,9 @@ class ApplicationManager { | |||
const std::shared_ptr<smart_objects::SmartObject>& | |||
request_for_registration) = 0; | |||
|
|||
virtual void FinalizeAppRegistration(ApplicationSharedPtr application, |
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.
Would be nice to have doxygen description
plugin.OnApplicationEvent(plugin_manager::kApplicationRegistered, | ||
application); | ||
}; | ||
application_manager_.ApplyFunctorForEachPlugin(on_app_registered); |
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.
In this case it is important to remember that when the plugin received kApplicationRegistered
event, the application is not finally registered. I would add this as a comment in the kApplicationRegistered
enum
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.
Noting that this placement is the most important part of the change. This event needed to happen before an app was added to the applications accessor in the app manager.
Fixes #3172 #3162
This PR is Ready for review.
Risk
This PR makes no API changes.
Testing Plan
Send on vehicle data notification at same time app registers. Core should not crash.
Summary
Moves the call to add the newly registered app to the applications list later in the registration process. This ensures that an app has all of its necessary plugins added before it is accessible by the applications accessor.
CLA