include IITC in the app’s resources and load it from there
IITC can only be updated with the app from now on, as the remote-loading code has been removed. The new injection method intercepts all resources being requested by the web page and either injects our code or and empty string. This should stop IITCM from requesting them at all, saving band- width and reducing the boot up time dramatically.
This commit is contained in:
@ -15,7 +15,7 @@ public class IITC_WebView extends WebView {
|
||||
private IITC_WebViewClient webclient;
|
||||
|
||||
// init web view
|
||||
private void iitc_init() {
|
||||
private void iitc_init(Context c) {
|
||||
settings = this.getSettings();
|
||||
settings.setJavaScriptEnabled(true);
|
||||
settings.setDomStorageEnabled(true);
|
||||
@ -31,7 +31,7 @@ public class IITC_WebView extends WebView {
|
||||
}
|
||||
});
|
||||
|
||||
webclient = new IITC_WebViewClient();
|
||||
webclient = new IITC_WebViewClient(c);
|
||||
this.setWebViewClient(webclient);
|
||||
}
|
||||
|
||||
@ -39,19 +39,19 @@ public class IITC_WebView extends WebView {
|
||||
public IITC_WebView(Context context) {
|
||||
super(context);
|
||||
|
||||
iitc_init();
|
||||
iitc_init(context);
|
||||
}
|
||||
|
||||
public IITC_WebView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
iitc_init();
|
||||
iitc_init(context);
|
||||
}
|
||||
|
||||
public IITC_WebView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
|
||||
iitc_init();
|
||||
iitc_init(context);
|
||||
}
|
||||
//----------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user