summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerFactory.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerFactory.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerFactory.java
index b6c1c955..3eae410f 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerFactory.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerFactory.java
@@ -16,12 +16,10 @@ public class ProviderApiManagerFactory {
}
public IProviderApiManager getProviderApiManager(Provider provider) throws IllegalArgumentException {
- switch (provider.getApiVersion()) {
- case 5:
- return new ProviderApiManagerV5(resources, callback);
- default:
- OkHttpClientGenerator clientGenerator = new OkHttpClientGenerator(resources);
- return new ProviderApiManagerV3(resources, clientGenerator, callback);
+ if (provider.getApiVersion() >= 5) {
+ return new ProviderApiManagerV5(resources, callback);
}
+ OkHttpClientGenerator clientGenerator = new OkHttpClientGenerator(resources);
+ return new ProviderApiManagerV3(resources, clientGenerator, callback);
}
}