diff options
author | Mykola Korniichuk (GitHub) <42380041+mkorniichuk@users.noreply.github.com> | 2020-01-17 18:36:02 +0200 |
---|---|---|
committer | Shobhit Adlakha <ShobhitAd@users.noreply.github.com> | 2020-01-17 11:36:02 -0500 |
commit | 6710b2e04ba5417ce1c0e1794b473963bf51df08 (patch) | |
tree | ec36f77b62c3c7e8a81a068bcc0ab96a53a0d9c5 /src/components/application_manager/include/application_manager/application_manager_impl.h | |
parent | e9709e670196427035466f07786fb0d22d484017 (diff) | |
download | sdl_core-6710b2e04ba5417ce1c0e1794b473963bf51df08.tar.gz |
Fix SDL app stream processing with non-streamable state. (#3151)
* Fix SDL app stream processing with non-streamable state.
For determining whether an application is allowed to stream,
SDL considered only HMI_Level.
Now streaming state is also taken into account.
Fix notifications for not streamable apps
* Fix unit tests after rename function in new inplimentation
* Minor fixes
* const parameter for StartEndStreamTimer
* Fix logging messages
* end_stream_timer shanged to SingleShot
* fix unit test for state_controller
* fixup! Minor fixes * const parameter for StartEndStreamTimer * Fix logging messages * end_stream_timer shanged to SingleShot * fix unit test for state_controller
* rename HMILevelAllowsStreaming -> HMIStateAllowsStreaming
* fixup! Fix SDL app stream processing with non-streamable state.
Co-authored-by: Yevhenii Dementieiev (GitHub) <57259850+ydementieiev@users.noreply.github.com>
Diffstat (limited to 'src/components/application_manager/include/application_manager/application_manager_impl.h')
-rw-r--r-- | src/components/application_manager/include/application_manager/application_manager_impl.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h index ee4e3a05a0..7ac8658dd4 100644 --- a/src/components/application_manager/include/application_manager/application_manager_impl.h +++ b/src/components/application_manager/include/application_manager/application_manager_impl.h @@ -213,9 +213,9 @@ class ApplicationManagerImpl void set_current_audio_source(const uint32_t source) OVERRIDE; - void OnHMILevelChanged(uint32_t app_id, - mobile_apis::HMILevel::eType from, - mobile_apis::HMILevel::eType to) OVERRIDE; + void OnHMIStateChanged(const uint32_t app_id, + const HmiStatePtr from, + const HmiStatePtr to) OVERRIDE; void ProcessOnDataStreamingNotification( const protocol_handler::ServiceType service_type, @@ -798,12 +798,13 @@ class ApplicationManagerImpl void RemovePolicyObserver(PolicyHandlerObserver* listener); /** - * @brief Checks HMI level and returns true if streaming is allowed + * @brief Checks application HMI state and returns true if streaming is + * allowed * @param app_id Application id * @param service_type Service type to check * @return True if streaming is allowed, false in other case */ - bool HMILevelAllowsStreaming( + bool HMIStateAllowsStreaming( uint32_t app_id, protocol_handler::ServiceType service_type) const OVERRIDE; @@ -1289,8 +1290,14 @@ class ApplicationManagerImpl * @param to the new HMILevel for the certain app. */ void ProcessApp(const uint32_t app_id, - const mobile_apis::HMILevel::eType from, - const mobile_apis::HMILevel::eType to); + const HmiStatePtr from, + const HmiStatePtr to); + + /** + * @brief Starts EndStream timer for a specified application + * @param app_id Application to process + */ + void StartEndStreamTimer(const uint32_t app_id); /** * @brief Allows to send appropriate message to mobile device. |