SSLHandshakeException is considered a sign of no network now

This commit is contained in:
Sergey Eremin
2017-01-20 04:26:41 +03:00
parent 468eadefd9
commit f4c9b4a29b

View File

@@ -15,6 +15,8 @@ import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import javax.net.ssl.SSLHandshakeException;
abstract class GoogleApiAsyncTask extends AsyncTask<Void, Void, Throwable> {
protected Context context;
@@ -73,6 +75,7 @@ abstract class GoogleApiAsyncTask extends AsyncTask<Void, Void, Throwable> {
} else if (e instanceof IOException) {
String message;
if (e instanceof UnknownHostException
|| e instanceof SSLHandshakeException
|| e instanceof ConnectException
|| e instanceof SocketException
|| e instanceof SocketTimeoutException) {