Skip to content

Commit

Permalink
MBL-1172: Remove Perimeter X (#1955)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkariang authored Feb 26, 2024
1 parent 0399ec9 commit 3b8e813
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 503 deletions.
3 changes: 0 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,6 @@ dependencies {
implementation 'com.segment.analytics.android:analytics:4.11.3'
implementation 'com.appboy:appboy-segment-integration:15.0.1'

// Security
implementation 'com.perimeterx.sdk:msdk:1.16.7'

// Dependencies for HTML Parser
implementation 'org.jsoup:jsoup:1.16.1'

Expand Down
35 changes: 10 additions & 25 deletions app/src/main/java/com/kickstarter/ApplicationModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
import com.kickstarter.libs.graphql.DateTimeAdapter;
import com.kickstarter.libs.graphql.Iso8601DateTimeAdapter;
import com.kickstarter.libs.graphql.EmailAdapter;
import com.kickstarter.libs.perimeterx.PerimeterXClient;
import com.kickstarter.libs.perimeterx.PerimeterXClientType;
import com.kickstarter.libs.preferences.BooleanPreference;
import com.kickstarter.libs.preferences.BooleanPreferenceType;
import com.kickstarter.libs.preferences.IntPreference;
Expand Down Expand Up @@ -228,18 +226,6 @@ static ApolloClient provideApolloClient(final @NonNull Build build, final @NonNu
.build();
}

@Provides
@Singleton
@NonNull
static PerimeterXClientType providePerimeterXManager(final @ApplicationContext @NonNull Context context, final @NonNull Build build) {
final PerimeterXClient manager = new PerimeterXClient(build);
if (context instanceof KSApplication && !((KSApplication) context).isInUnitTests()) {
manager.start(context);
}

return manager;
}

@Provides
@Singleton
@NonNull
Expand Down Expand Up @@ -287,17 +273,16 @@ static Retrofit provideApiRetrofitV2(final @NonNull ApiEndpoint apiEndpoint,
@NonNull
static ApiRequestInterceptor provideApiRequestInterceptor(
final @NonNull String clientId, final @NonNull CurrentUserTypeV2 currentUser,
final @NonNull ApiEndpoint endpoint, final @NonNull PerimeterXClientType manager,
final @NonNull Build build) {
return new ApiRequestInterceptor(clientId, currentUser, endpoint.url(), manager, build);
final @NonNull ApiEndpoint endpoint, final @NonNull Build build) {
return new ApiRequestInterceptor(clientId, currentUser, endpoint.url(), build);
}

@Provides
@Singleton
@NonNull
static GraphQLInterceptor provideGraphQLInterceptor(final @NonNull String clientId,
final @NonNull CurrentUserType currentUser, final @NonNull Build build, final @NonNull PerimeterXClientType manager) {
return new GraphQLInterceptor(clientId, currentUser, build, manager);
final @NonNull CurrentUserType currentUser, final @NonNull Build build) {
return new GraphQLInterceptor(clientId, currentUser, build);
}

@Provides
Expand Down Expand Up @@ -325,8 +310,8 @@ static String provideClientId(final @NonNull ApiEndpoint apiEndpoint) {
@Provides
@Singleton
@NonNull
static KSRequestInterceptor provideKSRequestInterceptor(final @NonNull Build build, final @NonNull PerimeterXClientType manager) {
return new KSRequestInterceptor(build, manager);
static KSRequestInterceptor provideKSRequestInterceptor(final @NonNull Build build) {
return new KSRequestInterceptor(build);
}

@Provides
Expand All @@ -352,8 +337,8 @@ static Retrofit provideWebRetrofit(@NonNull @WebEndpoint final String webEndpoin
@Singleton
@NonNull
static WebRequestInterceptor provideWebRequestInterceptor(final @NonNull CurrentUserType currentUser,
@NonNull @WebEndpoint final String endpoint, final @NonNull InternalToolsType internalTools, final @NonNull Build build, final @NonNull PerimeterXClientType manager) {
return new WebRequestInterceptor(currentUser, endpoint, internalTools, build, manager);
@NonNull @WebEndpoint final String endpoint, final @NonNull InternalToolsType internalTools, final @NonNull Build build) {
return new WebRequestInterceptor(currentUser, endpoint, internalTools, build);
}

private static @NonNull Retrofit createRetrofit(final @NonNull String baseUrl, final @NonNull Gson gson, final @NonNull OkHttpClient okHttpClient) {
Expand Down Expand Up @@ -591,8 +576,8 @@ static KSString provideKSString(final @PackageNameString @NonNull String package

@Provides
static KSWebViewClient provideKSWebViewClient(final @NonNull OkHttpClient okHttpClient,
final @WebEndpoint String webEndpoint, final @NonNull PerimeterXClientType manager) {
return new KSWebViewClient(okHttpClient, webEndpoint, manager);
final @WebEndpoint String webEndpoint) {
return new KSWebViewClient(okHttpClient, webEndpoint);
}

@Provides
Expand Down
127 changes: 0 additions & 127 deletions app/src/main/java/com/kickstarter/libs/perimeterx/PerimeterXClient.kt

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3b8e813

Please sign in to comment.