From 245636905431cc0c990901f8b50615b254b9d7d5 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 7 Mar 2024 10:07:03 +0100 Subject: [PATCH] Redirect only if url should be redirected Signed-off-by: tobiasKaminsky --- .../owncloud/android/ui/activity/ExternalSiteWebView.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/activity/ExternalSiteWebView.java b/app/src/main/java/com/owncloud/android/ui/activity/ExternalSiteWebView.java index 1282e96f0d5b..c02e299cd867 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/ExternalSiteWebView.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/ExternalSiteWebView.java @@ -156,8 +156,11 @@ public void onReceivedError(WebView view, WebResourceRequest request, WebResourc @Override public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { - DisplayUtils.startLinkIntent(self, request.getUrl()); - return true; + if (!request.isRedirect()) { + DisplayUtils.startLinkIntent(self, request.getUrl()); + return true; + } + return false; } });