From cc8283638737a84a51cd8d7b6ddb2bdb71252cee Mon Sep 17 00:00:00 2001 From: chanywa Date: Fri, 21 Apr 2017 17:25:33 +0900 Subject: [PATCH] Adds app id of XamarinFormsMaps.Tests Change-Id: I58dd05404cdb01792abaa10df7997a2413275c5e --- maps-plugin-here.changes | 5 +++++ packaging/maps-plugin-here.spec | 2 +- src/heremaps-check-uc.cpp | 32 ++++++++++++++++++-------------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/maps-plugin-here.changes b/maps-plugin-here.changes index 1675d85..96316db 100644 --- a/maps-plugin-here.changes +++ b/maps-plugin-here.changes @@ -1,3 +1,8 @@ +[Version] maps-plugin-here_0.3.21 +[Date] 21 Apr 2017 +[Title] Adds app id of XamarinFormsMaps.Tests +[Developer] Seechan Kim + [Version] maps-plugin-here_0.3.20 [Date] 14 Apr 2017 [Title] Add UC popup for TV profile diff --git a/packaging/maps-plugin-here.spec b/packaging/maps-plugin-here.spec index 3906431..60a8920 100644 --- a/packaging/maps-plugin-here.spec +++ b/packaging/maps-plugin-here.spec @@ -1,6 +1,6 @@ Name: maps-plugin-here Summary: Tizen HERE Maps Plug-in Library -Version: 0.3.20 +Version: 0.3.21 Release: 1 Group: Location/Libraries License: Apache-2.0 and HERE diff --git a/src/heremaps-check-uc.cpp b/src/heremaps-check-uc.cpp index 67cecd4..f2a50b5 100644 --- a/src/heremaps-check-uc.cpp +++ b/src/heremaps-check-uc.cpp @@ -27,12 +27,16 @@ bool heremaps_check_agreement() { - const char UTC_TPK_APP[] = "org.tizen.capi-maps-service-native-utc"; - const char ITC_TPK_APP[] = "org.tizen.capi-maps-service-native-itc"; - const char UTC_APP[] = "core.capi-maps-service-tests"; - const char ITC_APP[] = "native.capi-maps-service-itc"; - const char UTC_DOTNET_APP[] = "Tizen.Maps.Test"; - const char UTC_DOTNET_MANUAL_APP[] = "Tizen.Maps.Manual.Test"; + const int testAppIdCount = 7; + const char* testAppIdList[testAppIdCount] = { + "org.tizen.capi-maps-service-native-utc", + "org.tizen.capi-maps-service-native-itc", + "core.capi-maps-service-tests", + "native.capi-maps-service-itc", + "Tizen.Maps.Test", + "Tizen.Maps.Manual.Test", + "Tizen.XamarinFormsMaps.Tests" + }; int enabled = 0; int ret = 0; @@ -48,14 +52,14 @@ bool heremaps_check_agreement() ret = app_manager_get_app_id(nProcessId, &strAppId); if (ret != APP_MANAGER_ERROR_NONE) { MAPS_LOGI("Get app_id [%ld]. nRet[%d]", nProcessId, ret); - } else if (!strncmp(strAppId, UTC_APP, strlen(UTC_APP)) || - !strncmp(strAppId, ITC_APP, strlen(ITC_APP)) || - !strncmp(strAppId, UTC_TPK_APP, strlen(UTC_TPK_APP)) || - !strncmp(strAppId, ITC_TPK_APP, strlen(ITC_TPK_APP)) || - !strncmp(strAppId, UTC_DOTNET_APP, strlen(UTC_DOTNET_APP)) || - !strncmp(strAppId, UTC_DOTNET_MANUAL_APP, strlen(UTC_DOTNET_MANUAL_APP))) { - MAPS_LOGD("Requested by tct"); - enabled = 1; + } else { + for (int i = 0; i < testAppIdCount; i++) { + if (!strncmp(strAppId, testAppIdList[i], strlen(testAppIdList[i]))) { + MAPS_LOGD("Requested by tct"); + enabled = 1; + break; + } + } } } -- 2.7.4