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;
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;
+ }
+ }
}
}