+ fun bookmarksBrowse(@Suppress("UNUSED_PARAMETER") view: View) {
+ // Check to see if import or export is selected.
+ if (bookmarksImportRadioButton.isChecked) { // Import is selected.
+ // Open the file picker.
+ bookmarksBrowseForImportActivityResultLauncher.launch("*/*")
+ } else { // Export is selected.
+ // Open the file picker.
+ bookmarksBrowseForExportActivityResultLauncher.launch(getString(R.string.privacy_browser_bookmarks_html))
+ }
+ }
+
+ fun importExportBookmarks(@Suppress("UNUSED_PARAMETER") view: View) {
+ // Instantiate the import/export bookmarks helper.
+ val importExportBookmarksHelper = ImportExportBookmarksHelper()
+
+ // Get the file name string.
+ val fileNameString = bookmarksFileNameEditText.text.toString()
+
+ // Check to see if import or export is selected.
+ if (bookmarksImportRadioButton.isChecked) { // Import is selected.
+ // Import the bookmarks.
+ importExportBookmarksHelper.importBookmarks(fileNameString, context = this, scrollView)
+
+ // Repopulate the bookmarks in the main WebView activity.
+ MainWebViewActivity.restartFromBookmarksActivity = true
+ } else { // Export is selected.
+ // Export the bookmarks.
+ importExportBookmarksHelper.exportBookmarks(fileNameString, context = this, scrollView)
+ }
+ }
+
+ fun importExportSettings(@Suppress("UNUSED_PARAMETER") view: View) {
+ // Instantiate the import/export database helper.