summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc19
1 files changed, 13 insertions, 6 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 e08d2a3e0c..cbdaa713b8 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
@@ -299,12 +299,6 @@ void RegisterAppInterfaceRequest::Run() {
mobile_apis::Result::eType coincidence_result = CheckCoincidence();
- if (mobile_apis::Result::SUCCESS != coincidence_result) {
- LOG4CXX_ERROR(logger_, "Coincidence check failed.");
- SendResponse(false, coincidence_result);
- return;
- }
-
std::vector<ApplicationSharedPtr> duplicate_apps;
if (GetDuplicateNames(duplicate_apps)) {
LOG4CXX_ERROR(logger_,
@@ -319,6 +313,13 @@ void RegisterAppInterfaceRequest::Run() {
// Retrieve hybrid app preference from registering app
preference = app->hybrid_app_preference();
} else {
+ if (mobile_apis::Result::DUPLICATE_NAME == coincidence_result) {
+ usage_statistics::AppCounter count_of_rejections_duplicate_name(
+ GetPolicyHandler().GetStatisticManager(),
+ policy_app_id,
+ usage_statistics::REJECTIONS_DUPLICATE_NAME);
+ ++count_of_rejections_duplicate_name;
+ }
// Search for the hybrid app preference in the duplicate app list
for (auto duplicate_app : duplicate_apps) {
if (duplicate_app->is_cloud_app()) {
@@ -366,6 +367,12 @@ void RegisterAppInterfaceRequest::Run() {
}
}
+ if (mobile_apis::Result::SUCCESS != coincidence_result) {
+ LOG4CXX_ERROR(logger_, "Coincidence check failed.");
+ SendResponse(false, coincidence_result);
+ return;
+ }
+
if (IsWhiteSpaceExist()) {
LOG4CXX_INFO(logger_,
"Incoming register app interface has contains \t\n \\t \\n");