diff --git a/src/main/java/org/thoughtcrime/securesms/LocalHelpActivity.java b/src/main/java/org/thoughtcrime/securesms/LocalHelpActivity.java index ec851ce27..f05cbc3cd 100644 --- a/src/main/java/org/thoughtcrime/securesms/LocalHelpActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/LocalHelpActivity.java @@ -14,9 +14,6 @@ public class LocalHelpActivity extends WebViewActivity { public static final String SECTION_EXTRA = "section_extra"; - @Override - protected boolean shouldAskToOpenLink() { return false; } - @Override protected boolean allowInLockedMode() { return true; } diff --git a/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java b/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java index a5deb8493..87746a432 100644 --- a/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java @@ -37,7 +37,7 @@ public class WebViewActivity extends PassphraseRequiredActionBarActivity protected WebView webView; - protected boolean shouldAskToOpenLink() { return true; } + protected boolean shouldAskToOpenLink() { return false; } protected void toggleFakeProxy(boolean enable) { if (WebViewFeature.isFeatureSupported(WebViewFeature.PROXY_OVERRIDE)) { diff --git a/src/main/java/org/thoughtcrime/securesms/WebxdcActivity.java b/src/main/java/org/thoughtcrime/securesms/WebxdcActivity.java index abb5c8fa0..82b06fb96 100644 --- a/src/main/java/org/thoughtcrime/securesms/WebxdcActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/WebxdcActivity.java @@ -339,9 +339,12 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE } } + @Override + protected boolean shouldAskToOpenLink() { return true; } + // This is usually only called when internetAccess == true or for mailto/openpgp4fpr scheme, // because when internetAccess == false, the page is loaded inside an iframe, - // and WebViewClient.shouldOverrideUrlLoading is not called for HTTP(S) links inside the iframe + // and WebViewClient.shouldOverrideUrlLoading is not called for HTTP(S) links inside the iframe unless target=_blank is used @Override protected boolean openOnlineUrl(String url) { Log.i(TAG, "openOnlineUrl: " + url);