Revision e16a68b2
src/info/guardianproject/checkey/WebViewActivity.java | ||
---|---|---|
51 | 51 |
return true; |
52 | 52 |
} |
53 | 53 |
|
54 |
@Override |
|
55 |
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { |
|
56 |
Log.i("MyWebViewClient", "onReceivedSslError: " + uri); |
|
57 |
String host = uri.getHost(); |
|
58 |
Log.i("MyWebViewClient", "getPrimaryError: " + error.getPrimaryError()); |
|
59 |
int errno = error.getPrimaryError(); |
|
60 |
if (host.equals("androidobservatory.org") |
|
61 |
&& (errno == SslError.SSL_EXPIRED || errno == SslError.SSL_UNTRUSTED)) { |
|
62 |
handler.proceed(); |
|
63 |
} else { |
|
64 |
super.onReceivedSslError(view, handler, error); |
|
65 |
} |
|
66 |
} |
|
67 |
|
|
54 | 68 |
} |
55 | 69 |
} |
Also available in: Unified diff