diff options
author | mked-luxoft <mked@luxoft.com> | 2019-08-20 12:09:01 +0300 |
---|---|---|
committer | Andriy Byzhynar (GitHub) <AByzhynar@luxoft.com> | 2019-08-20 21:17:13 +0300 |
commit | b4432ad27d0207a60aed48171ef436eef4d7a91c (patch) | |
tree | aad485e4f5593589fb7b260c7fe30751d94990ba | |
parent | 7013e8a27fd4355e7f492b29f20f936194d6dfd7 (diff) | |
download | sdl_core-b4432ad27d0207a60aed48171ef436eef4d7a91c.tar.gz |
Fixes after rebase
3 files changed, 5 insertions, 11 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc index 499087a42d..ed261ad397 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc @@ -244,9 +244,6 @@ void RegisterAppInterfaceRequest::Run() { SendResponse(false, mobile_apis::Result::APPLICATION_REGISTERED_ALREADY); return; } - // cache the original app ID (for legacy behavior) - const std::string policy_app_id = - application_manager_.GetCorrectMobileIDFromMessage(message_); const smart_objects::SmartObject& msg_params = (*message_)[strings::msg_params]; @@ -871,7 +868,7 @@ void RegisterAppInterfaceRequest::SendRegisterAppInterfaceResponseToMobile( // Start PTU after successfull registration // Sends OnPermissionChange notification to mobile right after RAI response // and HMI level set-up - GetPolicyHandler().OnAppRegisteredOnMobile(application->policy_app_id()); + GetPolicyHandler().OnAppRegisteredOnMobile(application->mac_address(), application->policy_app_id()); if (resumption) { if (result_code != mobile_apis::Result::RESUME_FAILED) { resumer.StartResumption(application, hash_id); diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc index 39be0d08d3..05f466d96a 100644 --- a/src/components/application_manager/src/policies/policy_handler.cc +++ b/src/components/application_manager/src/policies/policy_handler.cc @@ -882,9 +882,6 @@ std::string PolicyHandler::OnCurrentDeviceIdUpdateRequired( "not found within registered applications."); return std::string(); } - DeviceParams device_params = GetDeviceParams( - app->device(), - application_manager_.connection_handler().get_session_observer()); return device_params.device_mac_address; } diff --git a/src/components/policy/policy_regular/test/policy_manager_impl_test.cc b/src/components/policy/policy_regular/test/policy_manager_impl_test.cc index 64ccc7ca56..ee531b17bd 100644 --- a/src/components/policy/policy_regular/test/policy_manager_impl_test.cc +++ b/src/components/policy/policy_regular/test/policy_manager_impl_test.cc @@ -650,11 +650,11 @@ TEST_F( "Life", 2, "Bluetooth"); - EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(app_id1)) + EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id1)) .WillRepeatedly(Return(dev_id1)); manager->SetUserConsentForDevice(dev_id1, true); // Add app from consented device. App will be assigned with default policies - manager->AddApplication(app_id1, HmiTypes(policy_table::AHT_DEFAULT)); + manager->AddApplication(app_id1, app_id1, HmiTypes(policy_table::AHT_DEFAULT)); // Act const char* const rpc_name = "CreateWindow"; const char* const hmi_level = "NONE"; @@ -703,11 +703,11 @@ TEST_F( "Life", 2, "Bluetooth"); - EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(app_id1)) + EXPECT_CALL(listener, OnCurrentDeviceIdUpdateRequired(_, app_id1)) .WillRepeatedly(Return(dev_id1)); manager->SetUserConsentForDevice(dev_id1, true); // Add app from consented device. App will be assigned with default policies - manager->AddApplication(app_id1, HmiTypes(policy_table::AHT_DEFAULT)); + manager->AddApplication(dev_id1, app_id1, HmiTypes(policy_table::AHT_DEFAULT)); // Act const char* const rpc_name = "DeleteWindow"; const char* const hmi_level = "NONE"; |