smartdevicelink / sdl_core

SmartDeviceLink In-Vehicle Software and Sample HMI
BSD 3-Clause "New" or "Revised" License
241 stars 245 forks source link

Fix restoring HMI application level #3836

Closed VadymLuchko closed 2 years ago

VadymLuchko commented 2 years ago

Fixes #3821

This PR is [ready ] for review.

Risk

This PR makes [no] API changes.

Testing Plan

ATF

Summary

The reason why HMI level was not restored is because the State Controller was not subscribed on ActivateApp event. There is noticed the State Controller subscribes in runtime on events CloseApplication and ActivateApp and then never unsubscribes from it. In PR the subscription condition has been changed to prevent situation when we mistakenly did not subscribe on event. And also added unsubscribe for these events.

CLA

VadymLuchko commented 2 years ago

@theresalech This PR is ready for Livio review