diff options
author | Conlain Kelly <conlain.k@gmail.com> | 2018-06-21 11:06:14 -0400 |
---|---|---|
committer | Conlain Kelly <conlain.k@gmail.com> | 2018-06-21 11:06:14 -0400 |
commit | 1dd1640ec5673cda85039b20b3999169bc357511 (patch) | |
tree | 56c6a62607138fb6c13fca666a5b47f2e067bd24 | |
parent | c452e6ef57202f1e07f1e13d0c0c2e4294e0e6b1 (diff) | |
download | sdl_core-1dd1640ec5673cda85039b20b3999169bc357511.tar.gz |
Check for hmi level instead of statusfix/check_onhmistatus_invalid
-rw-r--r-- | src/components/application_manager/src/commands/mobile/on_hmi_status_notification.cc | 9 |
1 files changed, 4 insertions, 5 deletions
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; } |