From fa72ebd8bcb8375470cfb92296516e797d3537e1 Mon Sep 17 00:00:00 2001 From: Mahdi ZTD Date: Wed, 29 May 2024 11:43:42 +0200 Subject: [PATCH] refac:rename list urlStrategy to urlStrategyDomains --- .../java/com/adjust/sdk/ActivityHandler.java | 8 ++--- .../java/com/adjust/sdk/AdjustConfig.java | 8 ++--- .../sdk/network/ActivityPackageSender.java | 4 +-- .../com/adjust/sdk/network/UrlStrategy.java | 30 +++++++++---------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java index 45629cb87..9b78a73fe 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java @@ -951,7 +951,7 @@ public void run() { IActivityPackageSender packageHandlerActivitySender = new ActivityPackageSender( - adjustConfig.urlStrategy, + adjustConfig.urlStrategyDomains, adjustConfig.useSubdomains, adjustConfig.basePath, adjustConfig.gdprPath, @@ -967,7 +967,7 @@ public void run() { IActivityPackageSender attributionHandlerActivitySender = new ActivityPackageSender( - adjustConfig.urlStrategy, + adjustConfig.urlStrategyDomains, adjustConfig.useSubdomains, adjustConfig.basePath, adjustConfig.gdprPath, @@ -983,7 +983,7 @@ public void run() { IActivityPackageSender sdkClickHandlerActivitySender = new ActivityPackageSender( - adjustConfig.urlStrategy, + adjustConfig.urlStrategyDomains, adjustConfig.useSubdomains, adjustConfig.basePath, adjustConfig.gdprPath, @@ -999,7 +999,7 @@ public void run() { IActivityPackageSender purchaseVerificationHandlerActivitySender = new ActivityPackageSender( - adjustConfig.urlStrategy, + adjustConfig.urlStrategyDomains, adjustConfig.useSubdomains, adjustConfig.basePath, adjustConfig.gdprPath, diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/AdjustConfig.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/AdjustConfig.java index 3a1d65cdb..d9e103b6c 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/AdjustConfig.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/AdjustConfig.java @@ -35,7 +35,7 @@ public class AdjustConfig { String externalDeviceId; boolean preinstallTrackingEnabled; Boolean needsCost; - List urlStrategy; + List urlStrategyDomains; boolean useSubdomains; boolean isDataResidency; String preinstallFilePath; @@ -164,7 +164,7 @@ public void setUrlStrategy(List domains, boolean useSubdomains, boolean logger.error("Invalid url strategy"); return; } - this.urlStrategy = domains; + this.urlStrategyDomains = domains; this.useSubdomains = useSubdomains; this.isDataResidency = isDataResidency; } @@ -285,8 +285,8 @@ public Boolean getNeedsCost() { return needsCost; } - public List getUrlStrategy() { - return urlStrategy; + public List getUrlStrategyDomains() { + return urlStrategyDomains; } public String getPreinstallFilePath() { diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/network/ActivityPackageSender.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/network/ActivityPackageSender.java index f8449f2ac..9eded4f26 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/network/ActivityPackageSender.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/network/ActivityPackageSender.java @@ -55,7 +55,7 @@ public class ActivityPackageSender implements IActivityPackageSender { private IConnectionOptions connectionOptions; private Context context; - public ActivityPackageSender(final List adjustUrlStrategy, + public ActivityPackageSender(final List urlStrategyDomains, final boolean useSubdomains, final String basePath, final String gdprPath, @@ -78,7 +78,7 @@ public ActivityPackageSender(final List adjustUrlStrategy, AdjustFactory.getGdprUrl(), AdjustFactory.getSubscriptionUrl(), AdjustFactory.getPurchaseVerificationUrl(), - adjustUrlStrategy, + urlStrategyDomains, useSubdomains); httpsURLConnectionProvider = AdjustFactory.getHttpsURLConnectionProvider(); connectionOptions = AdjustFactory.getConnectionOptions(); diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/network/UrlStrategy.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/network/UrlStrategy.java index 4f1c73f63..56c909f0a 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/network/UrlStrategy.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/network/UrlStrategy.java @@ -22,7 +22,7 @@ public class UrlStrategy { private static final String SUBSCRIPTION_URL_WORLD = "https://subscription.adjust.world"; private static final String PURCHASE_VERIFICATION_URL_WORLD = "https://ssrv.adjust.world"; - private final List adjustUrlStrategy; + private final List urlStrategyDomains; private final boolean useSubdomains; private final String baseUrlOverwrite; @@ -43,10 +43,10 @@ public UrlStrategy(final String baseUrlOverwrite, final String gdprUrlOverwrite, final String subscriptionUrlOverwrite, final String purchaseVerificationUrlOverwrite, - final List adjustUrlStrategy, + final List urlStrategyDomains, final boolean useSubdomains) { - this.adjustUrlStrategy = adjustUrlStrategy; + this.urlStrategyDomains = urlStrategyDomains; this.useSubdomains = useSubdomains; this.baseUrlOverwrite = baseUrlOverwrite; @@ -139,66 +139,66 @@ public String targetUrlByActivityKind(final ActivityKind activityKind) { private List baseUrlChoices() { - if (adjustUrlStrategy == null || adjustUrlStrategy.isEmpty()) { + if (urlStrategyDomains == null || urlStrategyDomains.isEmpty()) { return Arrays.asList(BASE_URL, BASE_URL_WORLD); } if (useSubdomains) { List baseUrls = new ArrayList<>(); - for (String url : adjustUrlStrategy) { + for (String url : urlStrategyDomains) { baseUrls.add(String.format(BASE_URL_FORMAT, url)); } return baseUrls; }else { List baseUrls = new ArrayList<>(); - for (String url : adjustUrlStrategy) { + for (String url : urlStrategyDomains) { baseUrls.add(String.format(BASE_URL_NO_SUB_DOMAIN_FORMAT, url)); } return baseUrls; } } private List gdprUrlChoices() { - if (adjustUrlStrategy == null || adjustUrlStrategy.isEmpty()) { + if (urlStrategyDomains == null || urlStrategyDomains.isEmpty()) { return Arrays.asList(GDPR_URL, GDPR_URL_WORLD); } List baseUrls = new ArrayList<>(); if (useSubdomains) { - for (String url : adjustUrlStrategy) { + for (String url : urlStrategyDomains) { baseUrls.add(String.format(GDPR_URL_FORMAT, url)); } }else { - for (String url : adjustUrlStrategy) { + for (String url : urlStrategyDomains) { baseUrls.add(String.format(BASE_URL_NO_SUB_DOMAIN_FORMAT, url)); } } return baseUrls; } private List subscriptionUrlChoices() { - if (adjustUrlStrategy == null || adjustUrlStrategy.isEmpty()) { + if (urlStrategyDomains == null || urlStrategyDomains.isEmpty()) { return Arrays.asList(SUBSCRIPTION_URL, SUBSCRIPTION_URL_WORLD); } List baseUrls = new ArrayList<>(); if (useSubdomains) { - for (String url : adjustUrlStrategy) { + for (String url : urlStrategyDomains) { baseUrls.add(String.format(SUBSCRIPTION_URL_FORMAT, url)); } }else { - for (String url : adjustUrlStrategy) { + for (String url : urlStrategyDomains) { baseUrls.add(String.format(BASE_URL_NO_SUB_DOMAIN_FORMAT, url)); } } return baseUrls; } private List purchaseVerificationUrlChoices() { - if (adjustUrlStrategy == null || adjustUrlStrategy.isEmpty()) { + if (urlStrategyDomains == null || urlStrategyDomains.isEmpty()) { return Arrays.asList(PURCHASE_VERIFICATION_URL, PURCHASE_VERIFICATION_URL_WORLD); } List baseUrls = new ArrayList<>(); if (useSubdomains){ - for (String url : adjustUrlStrategy) { + for (String url : urlStrategyDomains) { baseUrls.add(String.format(PURCHASE_VERIFICATION_URL_FORMAT, url)); } }else { - for (String url : adjustUrlStrategy) { + for (String url : urlStrategyDomains) { baseUrls.add(String.format(BASE_URL_NO_SUB_DOMAIN_FORMAT, url)); } }