notify android when select spinner is opened/closed (fix for #255)

This commit is contained in:
Philipp Schaefer
2013-05-11 14:41:15 +02:00
parent 76aeafbfa5
commit 96add49516
4 changed files with 30 additions and 0 deletions

View File

@ -19,6 +19,7 @@ public class IITC_WebView extends WebView {
private WebSettings settings;
private IITC_WebViewClient webclient;
private IITC_JSInterface js_interface;
private boolean disableJS = false;
// init web view
private void iitc_init(Context c) {
@ -85,6 +86,11 @@ public class IITC_WebView extends WebView {
return;
}
}
// do nothing if script is enabled;
if (this.disableJS == true) {
Log.d("iitcm", "javascript injection disabled...return");
return;
}
if (!url.startsWith("javascript:")) {
// force https if enabled in settings
SharedPreferences sharedPref = PreferenceManager
@ -123,4 +129,8 @@ public class IITC_WebView extends WebView {
return wifi.getState() == NetworkInfo.State.CONNECTED;
}
public void disableJS(boolean val) {
this.disableJS = val;
}
}