summaryrefslogtreecommitdiff
path: root/app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java')
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java b/app/src/production/java/se/leap/bitmaskclient/ProviderDetailFragment.java
index da7f8763..c7224ede 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.*;
-
import android.app.*;
import android.content.*;
import android.os.*;
@@ -22,7 +20,7 @@ public class ProviderDetailFragment extends DialogFragment {
LayoutInflater inflater = getActivity().getLayoutInflater();
View provider_detail_view = inflater.inflate(R.layout.provider_detail_fragment, null);
- JSONObject provider_json = new JSONObject(getActivity().getSharedPreferences(Dashboard.SHARED_PREFERENCES, getActivity().MODE_PRIVATE).getString(Provider.KEY, ""));
+ JSONObject provider_json = new JSONObject(getActivity().getSharedPreferences(Constants.SHARED_PREFERENCES, getActivity().MODE_PRIVATE).getString(Provider.KEY, ""));
final TextView domain = (TextView) provider_detail_view.findViewById(R.id.provider_detail_domain);
domain.setText(provider_json.getString(Provider.DOMAIN));
@@ -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(Constants.ALLOWED_ANON) && service_description.getBoolean(Constants.ALLOWED_ANON);
+ return service_description.has(Constants.PROVIDER_ALLOW_ANONYMOUS) && service_description.getBoolean(Constants.PROVIDER_ALLOW_ANONYMOUS);
} catch (JSONException e) {
return false;
}
@@ -77,8 +75,8 @@ public class ProviderDetailFragment extends DialogFragment {
@Override
public void onCancel(DialogInterface dialog) {
super.onCancel(dialog);
- SharedPreferences.Editor editor = getActivity().getSharedPreferences(Dashboard.SHARED_PREFERENCES, Activity.MODE_PRIVATE).edit();
- editor.remove(Provider.KEY).remove(Constants.ALLOWED_ANON).remove(Constants.KEY).commit();
+ SharedPreferences.Editor editor = getActivity().getSharedPreferences(Constants.SHARED_PREFERENCES, Activity.MODE_PRIVATE).edit();
+ editor.remove(Provider.KEY).remove(Constants.PROVIDER_ALLOW_ANONYMOUS).remove(Constants.PROVIDER_KEY).commit();
interface_with_configuration_wizard.cancelAndShowAllProviders();
}