From: Soren Stoutner Date: Sat, 27 Jul 2019 19:35:08 +0000 (-0700) Subject: Don't reset on-the-fly settings when navigating history in the same domain. https... X-Git-Tag: v3.3~16 X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff_plain;h=62bc4d5588388ebb3b115d47177121690b8e7983 Don't reset on-the-fly settings when navigating history in the same domain. https://redmine.stoutner.com/issues/477 --- diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index cf19d3a1..a452c0b1 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -1811,9 +1811,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Get the previous entry URL. String previousUrl = webBackForwardList.getItemAtIndex(webBackForwardList.getCurrentIndex() - 1).getUrl(); - // Reset the current domain name so that navigation works if third-party requests are blocked. - currentWebView.resetCurrentDomainName(); - // Apply the domain settings. applyDomainSettings(currentWebView, previousUrl, false, false); @@ -1830,9 +1827,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Get the next entry URL. String nextUrl = webBackForwardList.getItemAtIndex(webBackForwardList.getCurrentIndex() + 1).getUrl(); - // Reset the current domain name so that navigation works if third-party requests are blocked. - currentWebView.resetCurrentDomainName(); - // Apply the domain settings. applyDomainSettings(currentWebView, nextUrl, false, false); @@ -2861,9 +2855,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Get the previous entry URL. String previousUrl = webBackForwardList.getItemAtIndex(webBackForwardList.getCurrentIndex() - 1).getUrl(); - // Reset the current domain name so that navigation works if third-party requests are blocked. - currentWebView.resetCurrentDomainName(); - // Apply the domain settings. applyDomainSettings(currentWebView, previousUrl, false, false); @@ -3687,9 +3678,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook @Override public void navigateHistory(String url, int steps) { - // Reset the current domain name so that navigation works if third-party requests are blocked. - currentWebView.resetCurrentDomainName(); - // Apply the domain settings. applyDomainSettings(currentWebView, url, false, false); @@ -3705,9 +3693,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Get the previous entry URL. String previousUrl = webBackForwardList.getItemAtIndex(webBackForwardList.getCurrentIndex() - 1).getUrl(); - // Reset the current domain name so that navigation works if third-party requests are blocked. - currentWebView.resetCurrentDomainName(); - // Apply the domain settings. applyDomainSettings(currentWebView, previousUrl, false, false);