diff options
author | Parménides GV <parmegv@sdf.org> | 2013-04-16 18:14:47 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-04-16 18:14:47 +0200 |
commit | fbfdf86a1df28ccf8f1854c2e2a4c7b3135d50ae (patch) | |
tree | 0d85848b9b0a036147dd53b5ba847b8227e38f49 /src | |
parent | 418264e2a78371d133b510122f5ac3c9bd940764 (diff) |
Fixed bug #2225 (https://leap.se/code/issues/2225)
Diffstat (limited to 'src')
-rw-r--r-- | src/se/leap/leapclient/ConfigurationWizard.java | 3 | ||||
-rw-r--r-- | src/se/leap/leapclient/NewProviderDialog.java | 4 | ||||
-rw-r--r-- | src/se/leap/leapclient/ProviderAPI.java | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/se/leap/leapclient/ConfigurationWizard.java b/src/se/leap/leapclient/ConfigurationWizard.java index 4fbba1df..0d445227 100644 --- a/src/se/leap/leapclient/ConfigurationWizard.java +++ b/src/se/leap/leapclient/ConfigurationWizard.java @@ -21,6 +21,7 @@ import android.content.res.AssetManager; import android.os.Bundle;
import android.os.Handler;
import android.view.View;
+import android.widget.Toast;
/**
@@ -213,7 +214,7 @@ public class ConfigurationWizard extends Activity }
else if(resultCode == ConfigHelper.INCORRECTLY_DOWNLOADED_JSON_FILES) {
setResult(RESULT_CANCELED);
- finish(); + Toast.makeText(getApplicationContext(), "You have not entered a LEAP provider URL", Toast.LENGTH_LONG).show(); }
}
}
diff --git a/src/se/leap/leapclient/NewProviderDialog.java b/src/se/leap/leapclient/NewProviderDialog.java index 52453485..88e4711c 100644 --- a/src/se/leap/leapclient/NewProviderDialog.java +++ b/src/se/leap/leapclient/NewProviderDialog.java @@ -50,10 +50,10 @@ public class NewProviderDialog extends DialogFragment { String entered_url = url_input_field.getText().toString().trim(); if(validURL(entered_url)) { interface_with_ConfigurationWizard.saveProvider(entered_url); - Toast.makeText(getActivity().getApplicationContext(), "Valid URL", Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity().getApplicationContext(), "It seems your URL is well formed", Toast.LENGTH_LONG).show(); } else { url_input_field.setText(""); - Toast.makeText(getActivity().getApplicationContext(), "Not valid URL", Toast.LENGTH_LONG).show(); + Toast.makeText(getActivity().getApplicationContext(), "It seems your URL is not well formed", Toast.LENGTH_LONG).show(); } } }) diff --git a/src/se/leap/leapclient/ProviderAPI.java b/src/se/leap/leapclient/ProviderAPI.java index 07452a44..4ffd2762 100644 --- a/src/se/leap/leapclient/ProviderAPI.java +++ b/src/se/leap/leapclient/ProviderAPI.java @@ -6,6 +6,7 @@ import java.security.NoSuchAlgorithmException; import java.util.List; import java.net.MalformedURLException; import java.net.URL; +import java.net.UnknownHostException; import java.util.Scanner; import org.apache.http.HttpEntity; @@ -247,6 +248,8 @@ public class ProviderAPI extends IntentService { provider_json = new JSONObject(provider_json_string); } catch (MalformedURLException e1) { e1.printStackTrace(); + } catch (UnknownHostException e1) { + e1.printStackTrace(); } catch (IOException e1) { e1.printStackTrace(); } catch (JSONException e1) { |