diff options
author | Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> | 2020-02-14 20:32:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-14 13:32:24 -0500 |
commit | ece258838a44a5461d718c5eeae380ad11a3769b (patch) | |
tree | 455d6c08c2295caeaca682348e0bc88ab1950666 /src/components/application_manager/src/hmi_capabilities_impl.cc | |
parent | 656cb05756bbc20625adad8e4b2dcb6f40359352 (diff) | |
download | sdl_core-ece258838a44a5461d718c5eeae380ad11a3769b.tar.gz |
Fix LastState methods thread safe access (#2626)
* Fix LastState instance thread safe access
Fix LastState instance thread safe access
and update dictionary usages in app launch and resumption.
There was implemented LastStateWrapper class for providing exclusive
thread safe access to LastState instance from all places in the program.
Also passing LastState object was replaced with LastStateWrapper object
to avoid direct access to LastState instance from another components.
Thus there were a small updates in architecture of AM and TM classes.
* Fixed mocks and unit tests related to LastState class
* Add LastStateWrapper interface and LastStateWrapperPtr typedef
* Fix tests after adding LastStateWrapper interface
* Deprecate methods with changed signature
* Adapt RCConsentManager according to LastState functionality
There are some deprecated methods in LastState that are used by
RCConsentManager.
In addition, LastState::dictionary method returns reference to
dictionary no more - only copy of latter.
* Adapt AppServiceManager to new LastState usage
* Adapt transport manager to new LastState usage
* Adapt RPCPlugin to new LastState usage
* Adapt AppServiceRPCPlugin to new LastState usage
* Adapt RCRPCPlugin to new LastState usage
* Adapt SDLRPCPlugin to new LastState usage
* Adapt VehicleInfoPlugin to new LastState usage
* Adapt existing unit tests
* Fix ENABLE_LOG off build failure
* Replace old-style loops with range based
* Fix potential mutex deadlocks in resumption storage
* Add Mutable Data Accessor.
The entity that provides the thread-safe mutable access to data.
* Fix submodule issues after merge
Co-authored-by: Alexander Kutsan (GitHub) <akutsan@luxoft.com>
Co-authored-by: Yaroslav Mamykin (GitHub) <33784535+YarikMamykin@users.noreply.github.com>
Co-authored-by: Igor Gapchuk (GitHub) <41586842+IGapchuk@users.noreply.github.com>
Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com>
Diffstat (limited to 'src/components/application_manager/src/hmi_capabilities_impl.cc')
-rw-r--r-- | src/components/application_manager/src/hmi_capabilities_impl.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/application_manager/src/hmi_capabilities_impl.cc b/src/components/application_manager/src/hmi_capabilities_impl.cc index c66a8b9905..6a0fbf78e3 100644 --- a/src/components/application_manager/src/hmi_capabilities_impl.cc +++ b/src/components/application_manager/src/hmi_capabilities_impl.cc @@ -736,8 +736,9 @@ void HMICapabilitiesImpl::set_seat_location_capability( new smart_objects::SmartObject(seat_location_capability); } -void HMICapabilitiesImpl::Init(resumption::LastState* last_state) { - hmi_language_handler_.Init(last_state); +void HMICapabilitiesImpl::Init( + resumption::LastStateWrapperPtr last_state_wrapper) { + hmi_language_handler_.Init(last_state_wrapper); if (false == load_capabilities_from_file()) { LOG4CXX_ERROR(logger_, "file hmi_capabilities.json was not loaded"); } else { @@ -747,6 +748,8 @@ void HMICapabilitiesImpl::Init(resumption::LastState* last_state) { ui_language_, vr_language_, tts_language_); } +void HMICapabilitiesImpl::Init(resumption::LastState*) {} + bool HMICapabilitiesImpl::is_ui_cooperating() const { return is_ui_cooperating_; } |