diff --git a/res/raw/webxdc_wrapper.html b/res/raw/webxdc_wrapper.html
deleted file mode 100644
index a34781c50..000000000
--- a/res/raw/webxdc_wrapper.html
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/org/thoughtcrime/securesms/WebxdcActivity.java b/src/org/thoughtcrime/securesms/WebxdcActivity.java
index a9fc0ba0c..352473a06 100644
--- a/src/org/thoughtcrime/securesms/WebxdcActivity.java
+++ b/src/org/thoughtcrime/securesms/WebxdcActivity.java
@@ -40,7 +40,6 @@ import org.thoughtcrime.securesms.util.Prefs;
import org.thoughtcrime.securesms.util.Util;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.io.InputStream;
public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcEventDelegate {
@@ -122,7 +121,6 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
webSettings.setJavaScriptEnabled(true);
webSettings.setAllowFileAccess(false);
webSettings.setBlockNetworkLoads(!internetAccess);
- webView.setNetworkAvailable(internetAccess);
webSettings.setAllowContentAccess(false);
webSettings.setGeolocationEnabled(false);
webSettings.setAllowFileAccessFromFileURLs(false);
@@ -131,17 +129,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
webSettings.setDomStorageEnabled(true);
webView.addJavascriptInterface(new InternalJSApi(), "InternalJSApi");
-
- InputStream bootstrap_stream = getResources().openRawResource(R.raw.webxdc_wrapper);
- byte[] bootstrap_bytes = new byte[0];
- try {
- bootstrap_bytes = new byte[bootstrap_stream.available()];
- bootstrap_stream.read(bootstrap_bytes);
- String bootstrapHtml = new String(bootstrap_bytes);
- webView.loadDataWithBaseURL(this.baseURL + "/webxdc_bootstrap324567869.html", bootstrapHtml, "text/html", "UTF-8", null);
- } catch (IOException e) {
- e.printStackTrace();
- }
+ webView.loadUrl(this.baseURL + "/index.html");
Util.runOnAnyBackgroundThread(() -> {
final DcChat chat = dcContext.getChat(dcAppMsg.getChatId());
@@ -182,6 +170,10 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
@Override
protected boolean openOnlineUrl(String url) {
+ if (url.startsWith(baseURL +"/")) {
+ // internal page, continue loading in the WebView
+ return false;
+ }
if (url.startsWith("mailto:")) {
return super.openOnlineUrl(url);
}