From 1dd1640ec5673cda85039b20b3999169bc357511 Mon Sep 17 00:00:00 2001 From: Conlain Kelly Date: Thu, 21 Jun 2018 11:06:14 -0400 Subject: Check for hmi level instead of status --- .../src/commands/mobile/on_hmi_status_notification.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/components') diff --git a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc b/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc index 8b5cca31fe..a7453686e6 100644 --- a/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc +++ b/src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc @@ -57,11 +57,10 @@ void OnHMIStatusNotification::Run() { return; } - // If the RPC was bad, give up now and don't try to check hmi level - if ((*message_)[strings::msg_params][strings::result_code] == - mobile_apis::Result::INVALID_DATA) { - SendNotification(); - // we failed due to invalid data, don't do anything else + // If the response has no hmi level, return and don't send the notification + if (!(*message_)[strings::msg_params].keyExists(strings::hmi_level)) { + // our notification clearly isn't well-formed + LOG4CXX_ERROR(logger_, "OnHMIStatusNotification has no hmiLevel field"); return; } -- cgit v1.2.1