From dd4763d22efe6c9f45585c1ac7d83403ea2b2766 Mon Sep 17 00:00:00 2001 From: Jacob Keeler Date: Wed, 6 Oct 2021 17:01:19 -0400 Subject: Check specifically for invalid HMI level when suspending notifications (#3784) * Check specifically for invalid HMI level before suspending notifications Checking for main window ID caused a very rare race condition where the notification was not suspended when necessary --- src/components/application_manager/src/rpc_service_impl.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/application_manager/src/rpc_service_impl.cc b/src/components/application_manager/src/rpc_service_impl.cc index a610bd4371..36dcb335c1 100644 --- a/src/components/application_manager/src/rpc_service_impl.cc +++ b/src/components/application_manager/src/rpc_service_impl.cc @@ -148,8 +148,10 @@ bool RPCServiceImpl::ManageMobileCommand( if (app_ptr && (app_manager_.IsAppInReconnectMode(app_ptr->device(), app_ptr->policy_app_id()) || - (!app_ptr->WindowIdExists(window_id) && - mobile_apis::PredefinedWindows::DEFAULT_WINDOW == window_id && + (mobile_apis::PredefinedWindows::DEFAULT_WINDOW == window_id && + (!app_ptr->WindowIdExists(window_id) || + mobile_apis::HMILevel::INVALID_ENUM == + app_ptr->hmi_level(window_id)) && mobile_apis::messageType::notification == message_type))) { commands_holder_.Suspend( app_ptr, CommandHolder::CommandType::kMobileCommand, source, message); -- cgit v1.2.1