diff --git a/src/main/java/org/thoughtcrime/securesms/WebxdcActivity.java b/src/main/java/org/thoughtcrime/securesms/WebxdcActivity.java index 151417927..777e74695 100644 --- a/src/main/java/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/WebxdcActivity.java @@ -349,10 +349,12 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE } private void callJavaScriptFunction(String func) { - if (internetAccess) { - webView.evaluateJavascript("window." + func + ";", null); - } else { - webView.evaluateJavascript("document.getElementById('frame').contentWindow." + func + ";", null); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + if (internetAccess) { + webView.evaluateJavascript("window." + func + ";", null); + } else { + webView.evaluateJavascript("document.getElementById('frame').contentWindow." + func + ";", null); + } } }