summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkihiro-Miyazaki <60722633+Akihiro-Miyazaki@users.noreply.github.com>2021-08-19 06:23:30 +0900
committerGitHub <noreply@github.com>2021-08-18 17:23:30 -0400
commitca0cdaf10bae555a7bb5bdec0026adcc5f317eb6 (patch)
treec194e7f4794b6f8dc2bfda8d00cecc41806803d1
parent042872f24b2cf7d9c1b18cab81d502071de4b5a7 (diff)
downloadsdl_core-ca0cdaf10bae555a7bb5bdec0026adcc5f317eb6.tar.gz
Modify the code files according to sdl0264 proposal (#3738)
-rw-r--r--src/components/application_manager/include/application_manager/hmi_state.h2
-rw-r--r--src/components/application_manager/src/hmi_state.cc26
-rw-r--r--src/components/application_manager/test/state_controller/state_controller_test.cc12
3 files changed, 6 insertions, 34 deletions
diff --git a/src/components/application_manager/include/application_manager/hmi_state.h b/src/components/application_manager/include/application_manager/hmi_state.h
index e3a9784346..8271edcbd8 100644
--- a/src/components/application_manager/include/application_manager/hmi_state.h
+++ b/src/components/application_manager/include/application_manager/hmi_state.h
@@ -434,13 +434,11 @@ class PhoneCallHmiState : public HmiState {
PhoneCallHmiState(std::shared_ptr<Application> app,
const ApplicationManager& app_mngr);
- mobile_apis::HMILevel::eType hmi_level() const OVERRIDE;
mobile_apis::AudioStreamingState::eType audio_streaming_state()
const OVERRIDE {
return mobile_apis::AudioStreamingState::NOT_AUDIBLE;
}
- mobile_apis::HMILevel::eType max_hmi_level() const OVERRIDE;
mobile_apis::AudioStreamingState::eType max_audio_streaming_state()
const OVERRIDE {
return audio_streaming_state();
diff --git a/src/components/application_manager/src/hmi_state.cc b/src/components/application_manager/src/hmi_state.cc
index cebcdfd203..07200af6cd 100644
--- a/src/components/application_manager/src/hmi_state.cc
+++ b/src/components/application_manager/src/hmi_state.cc
@@ -241,32 +241,6 @@ PhoneCallHmiState::PhoneCallHmiState(std::shared_ptr<Application> app,
const ApplicationManager& app_mngr)
: HmiState(app, app_mngr, STATE_ID_PHONE_CALL) {}
-mobile_apis::HMILevel::eType PhoneCallHmiState::hmi_level() const {
- using namespace mobile_apis;
- if (HMILevel::INVALID_ENUM == parent_hmi_level()) {
- return parent_hmi_level();
- }
- return std::max(parent_hmi_level(), max_hmi_level());
-}
-
-mobile_apis::HMILevel::eType PhoneCallHmiState::max_hmi_level() const {
- using namespace helpers;
- using namespace mobile_apis;
-
- if (WindowType::WIDGET == window_type()) {
- return std::max(HMILevel::HMI_FULL, parent_max_hmi_level());
- }
-
- auto expected = HMILevel::HMI_FULL;
- if (is_navi_app() || is_mobile_projection_app()) {
- expected = HMILevel::HMI_LIMITED;
- } else if (is_media_app() || is_voice_communication_app()) {
- expected = HMILevel::HMI_BACKGROUND;
- }
-
- return std::max(expected, parent_max_hmi_level());
-}
-
SafetyModeHmiState::SafetyModeHmiState(std::shared_ptr<Application> app,
const ApplicationManager& app_mngr)
: HmiState(app, app_mngr, STATE_ID_SAFETY_MODE) {}
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 2730489d17..fa301e73ca 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
@@ -392,22 +392,22 @@ class StateControllerImplTest : public ::testing::Test {
case APP_TYPE_MEDIA: {
PrepareCommonStateResults(result_hmi_state);
result_hmi_state.push_back(
- createHmiState(HMILevel::HMI_BACKGROUND,
+ createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
- createHmiState(HMILevel::HMI_BACKGROUND,
+ createHmiState(HMILevel::HMI_LIMITED,
AudioStreamingState::NOT_AUDIBLE,
VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
- createHmiState(HMILevel::HMI_BACKGROUND,
+ createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
- createHmiState(HMILevel::HMI_BACKGROUND,
+ createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
@@ -426,12 +426,12 @@ class StateControllerImplTest : public ::testing::Test {
VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
- createHmiState(HMILevel::HMI_LIMITED,
+ createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));
result_hmi_state.push_back(
- createHmiState(HMILevel::HMI_LIMITED,
+ createHmiState(HMILevel::HMI_FULL,
AudioStreamingState::NOT_AUDIBLE,
VideoStreamingState::NOT_STREAMABLE,
SystemContext::SYSCTXT_MAIN));