diff options
author | Sean Leonard <meanderingcode@aetherislands.net> | 2014-02-28 17:21:36 -0800 |
---|---|---|
committer | Sean Leonard <meanderingcode@aetherislands.net> | 2014-02-28 17:21:36 -0800 |
commit | dfc259473a26bb71bca226c8290d227fa954bcb8 (patch) | |
tree | 1132b8e00b08bfdd690693bcd9ef25db482bc5d0 /src/se/leap/bitmaskclient/ProviderDetailFragment.java | |
parent | e6149d1d9ef77409e84d5982a92dd727f0bae2f7 (diff) | |
parent | 1fe78d00244f52f903435c970c0ebf0071a08f36 (diff) |
Merge branch 'feature/remove-shared-preferences-methods-from-ConfigHelper' into develop
Conflicts:
src/se/leap/bitmaskclient/Dashboard.java
Diffstat (limited to 'src/se/leap/bitmaskclient/ProviderDetailFragment.java')
-rw-r--r-- | src/se/leap/bitmaskclient/ProviderDetailFragment.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/se/leap/bitmaskclient/ProviderDetailFragment.java b/src/se/leap/bitmaskclient/ProviderDetailFragment.java index fd8b29d9..3ed04184 100644 --- a/src/se/leap/bitmaskclient/ProviderDetailFragment.java +++ b/src/se/leap/bitmaskclient/ProviderDetailFragment.java @@ -11,6 +11,7 @@ import android.app.AlertDialog; import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
+import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@@ -28,7 +29,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 = ConfigHelper.getJsonFromSharedPref(Provider.KEY);
+ JSONObject provider_json = new JSONObject(getActivity().getSharedPreferences(Dashboard.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));
@@ -82,11 +83,9 @@ public class ProviderDetailFragment extends DialogFragment { @Override
public void onCancel(DialogInterface dialog) {
- super.onCancel(dialog); - ConfigHelper.removeFromSharedPref(Provider.KEY);
- ConfigHelper.removeFromSharedPref(ProviderItem.DANGER_ON);
- ConfigHelper.removeFromSharedPref(EIP.ALLOWED_ANON);
- ConfigHelper.removeFromSharedPref(EIP.KEY); + super.onCancel(dialog);
+ SharedPreferences.Editor editor = getActivity().getSharedPreferences(Dashboard.SHARED_PREFERENCES, Activity.MODE_PRIVATE).edit();
+ editor.remove(Provider.KEY).remove(ProviderItem.DANGER_ON).remove(EIP.ALLOWED_ANON).remove(EIP.KEY).commit(); interface_with_configuration_wizard.showAllProviders(); }
|