summaryrefslogtreecommitdiff
path: root/app/src/production
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/production')
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/ProviderAPI.java9
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java6
2 files changed, 6 insertions, 9 deletions
diff --git a/app/src/production/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/production/java/se/leap/bitmaskclient/ProviderAPI.java
index eebc54c1..9ab90cc2 100644
--- a/app/src/production/java/se/leap/bitmaskclient/ProviderAPI.java
+++ b/app/src/production/java/se/leap/bitmaskclient/ProviderAPI.java
@@ -33,7 +33,6 @@ import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLHandshakeException;
import okhttp3.OkHttpClient;
-import se.leap.bitmaskclient.eip.EIPConstants;
import se.leap.bitmaskclient.eip.EIP;
import static se.leap.bitmaskclient.R.string.error_io_exception_user_message;
@@ -120,8 +119,8 @@ public class ProviderAPI extends ProviderApiBase {
//TODO setProviderName(name);
preferences.edit().putString(Provider.KEY, provider_json.toString()).commit();
- preferences.edit().putBoolean(EIPConstants.ALLOWED_ANON, provider_json.getJSONObject(Provider.SERVICE).getBoolean(EIPConstants.ALLOWED_ANON)).commit();
- preferences.edit().putBoolean(EIPConstants.ALLOWED_REGISTERED, provider_json.getJSONObject(Provider.SERVICE).getBoolean(EIPConstants.ALLOWED_REGISTERED)).commit();
+ preferences.edit().putBoolean(Constants.ALLOWED_ANON, provider_json.getJSONObject(Provider.SERVICE).getBoolean(Constants.ALLOWED_ANON)).commit();
+ preferences.edit().putBoolean(Constants.ALLOWED_REGISTERED, provider_json.getJSONObject(Provider.SERVICE).getBoolean(Constants.ALLOWED_REGISTERED)).commit();
result.putBoolean(RESULT_KEY, true);
} catch (JSONException e) {
@@ -150,7 +149,7 @@ public class ProviderAPI extends ProviderApiBase {
JSONObject eip_service_json = new JSONObject(eip_service_json_string);
eip_service_json.getInt(Provider.API_RETURN_SERIAL);
- preferences.edit().putString(EIPConstants.KEY, eip_service_json.toString()).commit();
+ preferences.edit().putString(Constants.KEY, eip_service_json.toString()).commit();
result.putBoolean(RESULT_KEY, true);
} catch (NullPointerException | JSONException e) {
@@ -173,7 +172,7 @@ public class ProviderAPI extends ProviderApiBase {
JSONObject provider_json = new JSONObject(preferences.getString(Provider.KEY, ""));
String provider_main_url = provider_json.getString(Provider.API_URL);
- URL new_cert_string_url = new URL(provider_main_url + "/" + provider_json.getString(Provider.API_VERSION) + "/" + EIPConstants.VPN_CERTIFICATE);
+ URL new_cert_string_url = new URL(provider_main_url + "/" + provider_json.getString(Provider.API_VERSION) + "/" + Constants.VPN_CERTIFICATE);
String cert_string = downloadWithProviderCA(new_cert_string_url.toString());
diff --git a/app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java b/app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java
index bd4c0d72..e288ebf8 100644
--- a/app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java
+++ b/app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java
@@ -2,8 +2,6 @@ package se.leap.bitmaskclient;
import org.json.*;
-import se.leap.bitmaskclient.eip.EIPConstants;
-
import android.app.*;
import android.content.*;
import android.os.*;
@@ -59,7 +57,7 @@ public class ProviderDetailFragment extends DialogFragment {
private boolean anon_allowed(JSONObject provider_json) {
try {
JSONObject service_description = provider_json.getJSONObject(Provider.SERVICE);
- return service_description.has(EIPConstants.ALLOWED_ANON) && service_description.getBoolean(EIPConstants.ALLOWED_ANON);
+ return service_description.has(Constants.ALLOWED_ANON) && service_description.getBoolean(Constants.ALLOWED_ANON);
} catch (JSONException e) {
return false;
}
@@ -78,7 +76,7 @@ public class ProviderDetailFragment extends DialogFragment {
public void onCancel(DialogInterface dialog) {
super.onCancel(dialog);
SharedPreferences.Editor editor = getActivity().getSharedPreferences(Constants.SHARED_PREFERENCES, Activity.MODE_PRIVATE).edit();
- editor.remove(Provider.KEY).remove(EIPConstants.ALLOWED_ANON).remove(EIPConstants.KEY).commit();
+ editor.remove(Provider.KEY).remove(Constants.ALLOWED_ANON).remove(Constants.KEY).commit();
interface_with_configuration_wizard.cancelAndShowAllProviders();
}