Fix/ Postpone application activation if registration is not complete yet #3557
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3549
This PR is [ready] for review.
Risk
This PR makes [no] API changes.
Testing Plan
Script from smartdevicelink/sdl_atf_test_scripts#2470
Summary
There was an issue when the SDL receives SDLActivateAppRequest from HMI and activates the app before the registration is completed and NONE HMI level is assigned. In this case, after the registration is complete SDL will assign NONE hmi level for the app that was in FULL so additional steps will be required to activate the application one more time.
To prevent such a situation additional check for app HMI level has been added during the app activation (SDLActivateAppRequest):
if the app HMI level is INVALID_ENUM - it means that the registration isn't complete yet - so we need to postpone the activation.
After the registration is completed and HMI level NONE is assigned - need to check if we have the postponed activation for the app and if yes - start the postponed activation.
CLA