Skip to content

Commit

Permalink
Revert "[MOB-6576] merge EUDC changes into encryption branch (#600)"
Browse files Browse the repository at this point in the history
This reverts commit f7623cd.
  • Loading branch information
evantk91 authored Jul 25, 2023
1 parent f7623cd commit c5c034f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 75 deletions.
3 changes: 0 additions & 3 deletions iterableapi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ dependencies {
testImplementation 'org.khronos:opengl-api:gl1.1-android-2.1_r1'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.2.2'
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
testImplementation project(path: ':iterableapi')
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
Expand Down Expand Up @@ -97,8 +96,6 @@ task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
excludes = ['**/*.kt']
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))

exclude '**/*.kt'
}

tasks.withType(Test) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ public class IterableConfig {
*/
final String[] allowedProtocols;

/**
* Data region determining which data center and endpoints are used by the SDK.
*/
final IterableDataRegion dataRegion;

/**
* This controls whether the in-app content should be saved to disk, or only kept in memory.
* By default, the SDK will save in-apps to disk.
Expand All @@ -96,7 +91,6 @@ private IterableConfig(Builder builder) {
authHandler = builder.authHandler;
expiringAuthTokenRefreshPeriod = builder.expiringAuthTokenRefreshPeriod;
allowedProtocols = builder.allowedProtocols;
dataRegion = builder.dataRegion;
useInMemoryStorageForInApps = builder.useInMemoryStorageForInApps;
encryptionEnforced = builder.encryptionEnforced;
}
Expand All @@ -113,7 +107,6 @@ public static class Builder {
private IterableAuthHandler authHandler;
private long expiringAuthTokenRefreshPeriod = 60000L;
private String[] allowedProtocols = new String[0];
private IterableDataRegion dataRegion = IterableDataRegion.US;
private boolean useInMemoryStorageForInApps = false;
private boolean encryptionEnforced = false;

Expand Down Expand Up @@ -242,16 +235,6 @@ public Builder setEncryptionEnforced(boolean encryptionEnforced) {
return this;
}

/**
* Set the data region used by the SDK
* @param dataRegion enum value that determines which endpoint to use, defaults to IterableDataRegion.US
*/
@NonNull
public Builder setDataRegion(@NonNull IterableDataRegion dataRegion) {
this.dataRegion = dataRegion;
return this;
}

/**
* Set whether the SDK should store in-apps only in memory, or in file storage
* @param useInMemoryStorageForInApps `true` will have in-apps be only in memory
Expand All @@ -268,4 +251,5 @@ public IterableConfig build() {
return new IterableConfig(this);
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,4 @@ public final class IterableConstants {

public static final String NO_MESSAGES_TITLE = "noMessagesTitle";
public static final String NO_MESSAGES_BODY = "noMessagesBody";
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*/
class IterableRequestTask extends AsyncTask<IterableApiRequest, Void, IterableApiResponse> {
static final String TAG = "IterableRequest";
static final String ITERABLE_BASE_URL = "https://api.iterable.com/api/";

static String overrideUrl;

Expand Down Expand Up @@ -64,8 +65,8 @@ static IterableApiResponse executeApiRequest(IterableApiRequest iterableApiReque
HttpURLConnection urlConnection = null;

IterableLogger.v(TAG, ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
String baseUrl = getBaseUrl();

String baseUrl = (iterableApiRequest.baseUrl != null && !iterableApiRequest.baseUrl.isEmpty()) ? iterableApiRequest.baseUrl :
ITERABLE_BASE_URL;
try {
if (overrideUrl != null && !overrideUrl.isEmpty()) {
baseUrl = overrideUrl;
Expand Down Expand Up @@ -224,18 +225,6 @@ static IterableApiResponse executeApiRequest(IterableApiRequest iterableApiReque
return apiResponse;
}

private static String getBaseUrl() {
IterableConfig config = IterableApi.getInstance().config;
IterableDataRegion dataRegion = config.dataRegion;
String baseUrl = dataRegion.getEndpoint();

if (overrideUrl != null && !overrideUrl.isEmpty()) {
baseUrl = overrideUrl;
}

return baseUrl;
}

private static boolean matchesErrorCode(JSONObject jsonResponse, String errorCode) {
try {
return jsonResponse != null && jsonResponse.has("code") && jsonResponse.getString("code").equals(errorCode);
Expand Down

This file was deleted.

0 comments on commit c5c034f

Please sign in to comment.