summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykola Korniichuk (GitHub) <42380041+mkorniichuk@users.noreply.github.com>2021-04-21 21:36:46 +0300
committerGitHub <noreply@github.com>2021-04-21 14:36:46 -0400
commit05d49242f21327c64f0700339520c5b6e3c3403b (patch)
tree4abf4628d1e241daf4d7a350275df0b4a60ec695
parent08d12403dd73b4fc374969e644ef1391bfdc5316 (diff)
downloadsdl_core-05d49242f21327c64f0700339520c5b6e3c3403b.tar.gz
SDL sends wrong OnHMIStatus for voice app in case of a phone call. (#2582)
* SDL sends wrong OnHMIStatus for voice app in case of a phone call. Once SDL received OnEventChanged(Phone_Call, true) from HMI, it should send OnHMIStatusUpdate with new HMILevel. Expected HMILevel for voice communication application is "LIMITED", but it is "FULL". PhoneCallHmiState should take into account voice communication app as an additional check. * Fix for state_controller unit tests. Due to changes in a logic for PhoneCallHmiState, unit tests have to be updated as well. ApplicationType enum is removed since it is not actual anymore. As a result, PrepareHMIStateResults functions are modified according to new application types and updated expected HMI states. Tests for NaviStreaming HMI state are enabled. NaviStreamingHmiState is used for these tests instead of VideoStreamingHmiState. New tests for different application types are added. * fix styling issues for state_controller_test * Fix hmi state merge conflicts * Revert test code * Fix unit test * Style Co-authored-by: JackLivio <jack@livio.io>
-rw-r--r--src/components/application_manager/src/hmi_state.cc2
-rw-r--r--src/components/application_manager/test/state_controller/state_controller_test.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/components/application_manager/src/hmi_state.cc b/src/components/application_manager/src/hmi_state.cc
index 3487116baf..cebcdfd203 100644
--- a/src/components/application_manager/src/hmi_state.cc
+++ b/src/components/application_manager/src/hmi_state.cc
@@ -260,7 +260,7 @@ mobile_apis::HMILevel::eType PhoneCallHmiState::max_hmi_level() const {
auto expected = HMILevel::HMI_FULL;
if (is_navi_app() || is_mobile_projection_app()) {
expected = HMILevel::HMI_LIMITED;
- } else if (is_media_app()) {
+ } else if (is_media_app() || is_voice_communication_app()) {
expected = HMILevel::HMI_BACKGROUND;
}
diff --git a/src/components/application_manager/test/state_controller/state_controller_test.cc b/src/components/application_manager/test/state_controller/state_controller_test.cc
index 16e8bff8b8..90b53dc6f9 100644
--- a/src/components/application_manager/test/state_controller/state_controller_test.cc
+++ b/src/components/application_manager/test/state_controller/state_controller_test.cc
@@ -604,7 +604,8 @@ class StateControllerImplTest : public ::testing::Test {
return APP_TYPE_NAVI;
}
- if (app->is_media_application()) {
+ if (app->is_media_application() ||
+ app->is_voice_communication_supported()) {
return APP_TYPE_MEDIA;
}