summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/se/leap/leapclient/ConfigurationWizard.java3
-rw-r--r--src/se/leap/leapclient/NewProviderDialog.java4
-rw-r--r--src/se/leap/leapclient/ProviderAPI.java3
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) {