summaryrefslogtreecommitdiff
path: root/app/src/insecure
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2020-03-17 08:15:56 -0700
committercyberta <cyberta@riseup.net>2020-03-17 08:15:56 -0700
commite0fb2a88c633908bba9e465e1bf1e19a4a5686e6 (patch)
tree781613cce835be44ea86178f8af6cb60a84a703e /app/src/insecure
parent05205190ee65a5fa14f18d12f86f5427368bea44 (diff)
parentcea55aaaab23a74dc790afca12671303fc344f97 (diff)
Merge branch 'androidx' into 'master'
Androidx See merge request leap/bitmask_android!103
Diffstat (limited to 'app/src/insecure')
-rw-r--r--app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java6
-rw-r--r--app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java b/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
index e86ab8ea..b67f6fa5 100644
--- a/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
+++ b/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
@@ -144,7 +144,7 @@ public class ProviderApiManager extends ProviderApiManagerBase {
if(providerDefinition.length() == 0 || caCert.isEmpty())
providerDotJsonString = downloadWithCommercialCA(providerMainUrl + "/provider.json", dangerOn);
else
- providerDotJsonString = downloadFromApiUrlWithProviderCA("/provider.json", caCert, providerDefinition, dangerOn);
+ providerDotJsonString = downloadFromApiUrlWithProviderCA("/provider.json", caCert, provider, dangerOn);
if (ConfigHelper.checkErroneousDownload(providerDotJsonString) || !isValidJson(providerDotJsonString)) {
setErrorResult(result, malformed_url, null);
@@ -291,10 +291,10 @@ public class ProviderApiManager extends ProviderApiManagerBase {
return responseString;
}
- private String downloadFromApiUrlWithProviderCA(String path, String caCert, JSONObject providerDefinition, boolean dangerOn) {
+ private String downloadFromApiUrlWithProviderCA(String path, String caCert, Provider provider, boolean dangerOn) {
String responseString;
JSONObject errorJson = new JSONObject();
- String baseUrl = getApiUrl(providerDefinition);
+ String baseUrl = provider.getApiUrlString();
OkHttpClient okHttpClient = clientGenerator.initSelfSignedCAHttpClient(caCert, errorJson);
if (okHttpClient == null) {
return errorJson.toString();
diff --git a/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java b/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java
index dfadaf05..d151c987 100644
--- a/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java
+++ b/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java
@@ -17,7 +17,7 @@
package se.leap.bitmaskclient;
import android.os.Bundle;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import static se.leap.bitmaskclient.Constants.DANGER_ON;
import static se.leap.bitmaskclient.ProviderAPI.SET_UP_PROVIDER;