show an alert dialog which describes the workaround for the Google login

(see #497)
This commit is contained in:
Philipp Schaefer
2013-08-29 18:50:26 +02:00
parent 0cf9cef36e
commit 38dce23c17
3 changed files with 67 additions and 12 deletions

View File

@ -25,11 +25,13 @@ public class IITC_WebView extends WebView {
private WebSettings mSettings;
private IITC_WebViewClient mIitcWebViewClient;
private IITC_JSInterface mJsInterface;
private Context mContext;
private boolean mDisableJs = false;
// init web view
private void iitc_init(Context c) {
if (this.isInEditMode()) return;
mContext = c;
mSettings = this.getSettings();
mSettings.setJavaScriptEnabled(true);
mSettings.setDomStorageEnabled(true);
@ -40,7 +42,7 @@ public class IITC_WebView extends WebView {
+ "/databases/");
mSettings.setAppCachePath(this.getContext().getCacheDir()
.getAbsolutePath());
this.mJsInterface = new IITC_JSInterface(c);
this.mJsInterface = new IITC_JSInterface(mContext);
this.addJavascriptInterface(mJsInterface, "android");
this.setWebChromeClient(new WebChromeClient() {
@ -134,7 +136,7 @@ public class IITC_WebView extends WebView {
url = url.replace("https://", "http://");
// disable splash screen if a http error code is responded
new CheckHttpResponse(mJsInterface).execute(url);
new CheckHttpResponse(mJsInterface, mContext).execute(url);
Log.d("iitcm", "loading url: " + url);
}
super.loadUrl(url);