summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/NewProviderDialog.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-04-22 20:17:43 +0200
committerParménides GV <parmegv@sdf.org>2013-04-29 17:09:12 +0200
commitbfe2263d6b73159a4f929bc7b1fdeb724c88e8de (patch)
tree117dfac77111d69e1fcad3880e165646feef6c29 /src/se/leap/leapclient/NewProviderDialog.java
parent75728462433b19567710f54a9d4767681b10be95 (diff)
Added danger mode: we can bypass dev.bitmask.net hostname io exception.
Diffstat (limited to 'src/se/leap/leapclient/NewProviderDialog.java')
-rw-r--r--src/se/leap/leapclient/NewProviderDialog.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/se/leap/leapclient/NewProviderDialog.java b/src/se/leap/leapclient/NewProviderDialog.java
index 88e4711c..61018463 100644
--- a/src/se/leap/leapclient/NewProviderDialog.java
+++ b/src/se/leap/leapclient/NewProviderDialog.java
@@ -8,13 +8,14 @@ import android.content.DialogInterface;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
+import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Toast;
public class NewProviderDialog extends DialogFragment {
public interface NewProviderDialogInterface {
- public void saveProvider(String url_provider);
+ public void saveProvider(String url_provider, boolean danger_on);
}
NewProviderDialogInterface interface_with_ConfigurationWizard;
@@ -43,13 +44,16 @@ public class NewProviderDialog extends DialogFragment {
LayoutInflater inflater = getActivity().getLayoutInflater();
View new_provider_dialog_view = inflater.inflate(R.layout.new_provider_dialog, null);
final EditText url_input_field = (EditText)new_provider_dialog_view.findViewById(R.id.new_provider_url);
+ final CheckBox danger_checkbox = (CheckBox)new_provider_dialog_view.findViewById(R.id.danger_checkbox);
+
builder.setView(new_provider_dialog_view)
.setMessage(R.string.introduce_new_provider)
.setPositiveButton(R.string.save, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
String entered_url = url_input_field.getText().toString().trim();
+ boolean danger_on = danger_checkbox.isChecked();
if(validURL(entered_url)) {
- interface_with_ConfigurationWizard.saveProvider(entered_url);
+ interface_with_ConfigurationWizard.saveProvider(entered_url, danger_on);
Toast.makeText(getActivity().getApplicationContext(), "It seems your URL is well formed", Toast.LENGTH_LONG).show();
} else {
url_input_field.setText("");