only ask to open link in webxdc

This commit is contained in:
adbenitez
2025-11-23 22:18:55 +01:00
parent a66b4d8923
commit d8ea2ad273
3 changed files with 5 additions and 5 deletions
@@ -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; }
@@ -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)) {
@@ -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);