diff options
author | Jacob Keeler <jacob.keeler@livioradio.com> | 2021-10-06 17:01:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-06 17:01:19 -0400 |
commit | dd4763d22efe6c9f45585c1ac7d83403ea2b2766 (patch) | |
tree | 2090f45a586cf74803ad8df7688d45f671b1c2db | |
parent | 86e032f7829217f3a4c718e8d2d96c951c70a71c (diff) | |
download | sdl_core-dd4763d22efe6c9f45585c1ac7d83403ea2b2766.tar.gz |
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
-rw-r--r-- | src/components/application_manager/src/rpc_service_impl.cc | 6 |
1 files 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); |