Clear domain settings before opening a file. https://redmine.stoutner.com/issues/554
authorSoren Stoutner <soren@stoutner.com>
Tue, 13 Oct 2020 02:29:37 +0000 (19:29 -0700)
committerSoren Stoutner <soren@stoutner.com>
Tue, 13 Oct 2020 02:29:37 +0000 (19:29 -0700)
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java

index b54b3d05805e4edea9cf035699eb50cd7e8eba25..9107d5af73da0b4bbc3b01badde3ea66e963a0fb 100644 (file)
@@ -2992,6 +2992,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Get the file path string.
         openFilePath = fileNameEditText.getText().toString();
 
+        // Apply the domain settings.  This resets the favorite icon and removes any domain settings.
+        applyDomainSettings(currentWebView, "file://" + openFilePath, true, false);
+
         // Check to see if the storage permission is needed.
         if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {  // The storage permission has been granted.
             // Open the file.