boost performance on kitkat:
ignore result of javascript. it's slow and we only can use it on kitkat.
This commit is contained in:
parent
8e7e4ec14a
commit
3e00645f4a
@ -165,12 +165,7 @@ public class IITC_WebView extends WebView {
|
|||||||
|
|
||||||
public void loadJS(String js) {
|
public void loadJS(String js) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
evaluateJavascript(js, new ValueCallback<String>() {
|
evaluateJavascript(js, null);
|
||||||
@Override
|
|
||||||
public void onReceiveValue(String value) {
|
|
||||||
// maybe we want to add stuff here
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
// if in edit text mode, don't load javascript otherwise the keyboard closes.
|
// if in edit text mode, don't load javascript otherwise the keyboard closes.
|
||||||
HitTestResult testResult = getHitTestResult();
|
HitTestResult testResult = getHitTestResult();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user