Revert "Showing connection error DO NOT MERGE"
It doesn't work right now. Work moved into error branch.
This reverts commit 5d635e4408
.
This commit is contained in:
parent
f223b58e21
commit
ba8b96c22e
2 changed files with 1 additions and 12 deletions
app/src/main
|
@ -12,15 +12,12 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.ConnectException;
|
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import info.nerull7.mysqlbrowser.R;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by nerull7 on 07.07.14.
|
* Created by nerull7 on 07.07.14.
|
||||||
* Database connector using Async calls
|
* Database connector using Async calls
|
||||||
|
@ -403,14 +400,7 @@ public class AsyncDatabaseConnector {
|
||||||
urlConnection.setReadTimeout(READ_TIMEOUT);
|
urlConnection.setReadTimeout(READ_TIMEOUT);
|
||||||
urlConnection.setConnectTimeout(CONNECTION_TIMEOUT);
|
urlConnection.setConnectTimeout(CONNECTION_TIMEOUT);
|
||||||
urlConnection.setRequestMethod(CONNECTION_REQUEST_METHOD);
|
urlConnection.setRequestMethod(CONNECTION_REQUEST_METHOD);
|
||||||
try {
|
urlConnection.connect();
|
||||||
urlConnection.connect();
|
|
||||||
} catch (ConnectException e) {
|
|
||||||
// errorMsg = e.getMessage();
|
|
||||||
if (e.getCause().equals(CONNECTION_REQUEST_METHOD)) {
|
|
||||||
errorMsg == R.string.error_connection_timeout; // FIXME
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(urlConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {
|
if(urlConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -49,6 +49,5 @@
|
||||||
<string name="save_credentials">Save credentials</string>
|
<string name="save_credentials">Save credentials</string>
|
||||||
<string name="connector_url">Connector URL</string>
|
<string name="connector_url">Connector URL</string>
|
||||||
<string name="no_connection">No Internet Connection</string>
|
<string name="no_connection">No Internet Connection</string>
|
||||||
<string name="error_connection_timeout">Connection timeout</string>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue