summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src/commands/hmi
diff options
context:
space:
mode:
authorAlexander Kutsan <AKutsan@luxoft.com>2016-08-04 18:00:16 +0300
committerdtrunov <dtrunov@luxoft.com>2016-08-19 14:15:56 +0300
commit443a4705cba08ceb07d6ccab6f1fc4d3adc32659 (patch)
tree0f7a2f07edd7deef1c2f43e1e69f21a70b909f5c /src/components/application_manager/src/commands/hmi
parentef2c8c756b794ef798e1bb1dd3ed5b22739c57e1 (diff)
downloadsdl_core-443a4705cba08ceb07d6ccab6f1fc4d3adc32659.tar.gz
VehicleInfo interface: SDL behavior in case HMI does not respond to IsReady request or respond with "available" = false
Added logic for processing case when HMI does not respond to IsReady request or respond with "available"=false. Based on implementation CRQ [APPLINK-20920](https://adc.luxoft.com/jira/browse/APPLINK-20920) CRQ [APPLINK-25201](https://adc.luxoft.com/jira/browse/APPLINK-25201)
Diffstat (limited to 'src/components/application_manager/src/commands/hmi')
-rw-r--r--src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc13
-rw-r--r--src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc13
2 files changed, 12 insertions, 14 deletions
diff --git a/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc b/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc
index a78d49af93..0f62b6662a 100644
--- a/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc
+++ b/src/components/application_manager/src/commands/hmi/vi_is_ready_response.cc
@@ -48,18 +48,17 @@ void VIIsReadyResponse::Run() {
bool is_available = false;
if (object[strings::msg_params].keyExists(strings::available)) {
is_available = object[strings::msg_params][strings::available].asBool();
+ const HmiInterfaces::InterfaceState interface_state =
+ is_available ? HmiInterfaces::STATE_AVAILABLE
+ : HmiInterfaces::STATE_NOT_AVAILABLE;
+ HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
+ hmi_interfaces.SetInterfaceState(HmiInterfaces::HMI_INTERFACE_VehicleInfo,
+ interface_state);
}
HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_is_ivi_cooperating(is_available);
- const HmiInterfaces::InterfaceState interface_state =
- is_available ? HmiInterfaces::STATE_AVAILABLE
- : HmiInterfaces::STATE_NOT_AVAILABLE;
- HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
- hmi_interfaces.SetInterfaceState(HmiInterfaces::HMI_INTERFACE_VehicleInfo,
- interface_state);
-
application_manager_.GetPolicyHandler().OnVIIsReady();
}
diff --git a/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc b/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc
index e30bed4b88..c523387f1b 100644
--- a/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc
+++ b/src/components/application_manager/src/commands/hmi/vr_is_ready_response.cc
@@ -48,17 +48,16 @@ void VRIsReadyResponse::Run() {
bool is_available = false;
if (object[strings::msg_params].keyExists(strings::available)) {
is_available = object[strings::msg_params][strings::available].asBool();
+ const HmiInterfaces::InterfaceState interface_state =
+ is_available ? HmiInterfaces::STATE_AVAILABLE
+ : HmiInterfaces::STATE_NOT_AVAILABLE;
+ HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
+ hmi_interfaces.SetInterfaceState(HmiInterfaces::HMI_INTERFACE_VR,
+ interface_state);
}
HMICapabilities& hmi_capabilities = application_manager_.hmi_capabilities();
hmi_capabilities.set_is_vr_cooperating(is_available);
-
- const HmiInterfaces::InterfaceState interface_state =
- is_available ? HmiInterfaces::STATE_AVAILABLE
- : HmiInterfaces::STATE_NOT_AVAILABLE;
- HmiInterfaces& hmi_interfaces = application_manager_.hmi_interfaces();
- hmi_interfaces.SetInterfaceState(HmiInterfaces::HMI_INTERFACE_VR,
- interface_state);
}
} // namespace commands