Fix application activation after resumption #3550
Merged
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 #3542 #3532
This PR is ready for review.
Risk
This PR makes no API changes.
Testing Plan
Covered by ATF test scripts
Summary
There is a case when media application acquires wrong HMI Level (NONE instead of FULL) during activation. Root cause of this issue is a
true
value ofis_resuming
flag for application, which in fact completed resumption process. Before this flag was set to false only for applications with failed resumption, so there is a need to assign it to false for all already resumed applications regardless of successfulness of resumption.Also note, that after widget resumption SDL doesn't resend the OnSCU notification with updates for the widget to the mobile app (If HMI sends this notification after the resumption is finished). This is happening because we are checking the value of
is_resuming_
flag, which now istrue
even if the application was resumed and it had widgets to resume. So root cause of wrong behavior of OnSCU notification is incorrect value ofis_resuming_
flag after completed resumption.Additionally tiny refactoring was performed for two methods of ResumeController class:
RestoreAppHMIState
andStartAppHmiStateResumption
. Their return value was changed from bool to void, because in fact we don't need this values, and determination of this value makes logic of these methods more complicated than it may be. Mentioned methods are invoked only once inside of ResumeController class, that's why this changes cannot adversely affect another logic.CLA