]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Remove the SaveDialog. https://redmine.stoutner.com/issues/769
authorSoren Stoutner <soren@stoutner.com>
Thu, 18 Nov 2021 22:06:05 +0000 (15:06 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 18 Nov 2021 22:06:05 +0000 (15:06 -0700)
31 files changed:
app/build.gradle
app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.kt
app/src/main/java/com/stoutner/privacybrowser/activities/LogcatActivity.kt
app/src/main/java/com/stoutner/privacybrowser/asynctasks/SaveAboutVersionImage.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveDialog.kt [deleted file]
app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.java [deleted file]
app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt [new file with mode: 0644]
app/src/main/res/drawable/save_dialog_day.xml [deleted file]
app/src/main/res/drawable/save_dialog_night.xml [deleted file]
app/src/main/res/drawable/save_text_blue_day.xml [deleted file]
app/src/main/res/drawable/save_text_blue_night.xml [deleted file]
app/src/main/res/layout/about_version.xml [deleted file]
app/src/main/res/layout/about_version_scrollview.xml [new file with mode: 0644]
app/src/main/res/values-de/strings.xml
app/src/main/res/values-es/strings.xml
app/src/main/res/values-fr/strings.xml
app/src/main/res/values-it/strings.xml
app/src/main/res/values-night-v23/styles.xml
app/src/main/res/values-night-v27/styles.xml
app/src/main/res/values-night/colors.xml
app/src/main/res/values-night/styles.xml
app/src/main/res/values-pt-rBR/strings.xml
app/src/main/res/values-ru/strings.xml
app/src/main/res/values-tr/strings.xml
app/src/main/res/values-v23/styles.xml
app/src/main/res/values-v27/styles.xml
app/src/main/res/values/attrs.xml
app/src/main/res/values/colors.xml
app/src/main/res/values/strings.xml
app/src/main/res/values/styles.xml
build.gradle

index 8d3fd799370c27f075855b5880878ea32937beef..b4e8d9cd1131df2800d9ce2cba73ef22c6d82f3e 100644 (file)
@@ -78,8 +78,8 @@ dependencies {
     implementation 'androidx.viewpager:viewpager:1.0.0'
     implementation 'androidx.webkit:webkit:1.4.0'
 
-    // Include the Kotlin standard libraries.  This should be the same version number listed in project build.gradle.
-    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31'
+    // Include the Kotlin standard library.  This should be the same version number listed in project build.gradle.
+    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0'
 
     // Include the Google material library.
     implementation 'com.google.android.material:material:1.4.0'
index b275e6e078698de8e271774a17ce3e95c26fa794..d52d95ec040bc49bf69d282a3fdc017815c95903 100644 (file)
 
 package com.stoutner.privacybrowser.activities
 
-import android.content.Intent
-import android.net.Uri
 import android.os.Bundle
 import android.view.WindowManager
-import android.widget.EditText
-import android.widget.LinearLayout
 
 import androidx.appcompat.app.AppCompatActivity
 import androidx.appcompat.widget.Toolbar
-import androidx.fragment.app.DialogFragment
 import androidx.preference.PreferenceManager
 import androidx.viewpager.widget.ViewPager
 
-import com.google.android.material.snackbar.Snackbar
 import com.google.android.material.tabs.TabLayout
 
 import com.stoutner.privacybrowser.R
 import com.stoutner.privacybrowser.adapters.AboutPagerAdapter
-import com.stoutner.privacybrowser.asynctasks.SaveAboutVersionImage
-import com.stoutner.privacybrowser.dialogs.SaveDialog
-import com.stoutner.privacybrowser.dialogs.SaveDialog.SaveListener
-import com.stoutner.privacybrowser.fragments.AboutVersionFragment
 
-import java.io.ByteArrayInputStream
-import java.io.InputStream
-import java.lang.Exception
-import java.nio.charset.StandardCharsets
-
-class AboutActivity : AppCompatActivity(), SaveListener {
+class AboutActivity : AppCompatActivity() {
     // Declare the class variables.
     private lateinit var aboutPagerAdapter: AboutPagerAdapter
 
@@ -114,85 +99,4 @@ class AboutActivity : AppCompatActivity(), SaveListener {
         // Connect the tab layout to the view pager.
         aboutTabLayout.setupWithViewPager(aboutViewPager)
     }
-
-    // The activity result is called after browsing for a file in the save alert dialog.
-    public override fun onActivityResult(requestCode: Int, resultCode: Int, returnedIntent: Intent?) {
-        // Run the default commands.
-        super.onActivityResult(requestCode, resultCode, returnedIntent)
-
-        // Only do something if the user didn't press back from the file picker.
-        if (resultCode == RESULT_OK) {
-            // Get a handle for the save dialog fragment.
-            val saveDialogFragment = supportFragmentManager.findFragmentByTag(getString(R.string.save_dialog)) as DialogFragment?
-
-            // Only update the file name if the dialog still exists.
-            if (saveDialogFragment != null) {
-                // Get a handle for the save dialog.
-                val saveDialog = saveDialogFragment.dialog!!
-
-                // Get a handle for the file name edit text.
-                val fileNameEditText = saveDialog.findViewById<EditText>(R.id.file_name_edittext)
-
-                // Get the file name URI from the intent.
-                val fileNameUri = returnedIntent!!.data
-
-                // Get the file name string from the URI.
-                val fileNameString = fileNameUri.toString()
-
-                // Set the file name text.
-                fileNameEditText.setText(fileNameString)
-
-                // Move the cursor to the end of the file name edit text.
-                fileNameEditText.setSelection(fileNameString.length)
-            }
-        }
-    }
-
-    override fun onSave(saveType: Int, dialogFragment: DialogFragment) {
-        // Get a handle for the dialog.
-        val dialog = dialogFragment.dialog!!
-
-        // Get a handle for the file name edit text.
-        val fileNameEditText = dialog.findViewById<EditText>(R.id.file_name_edittext)
-
-        // Get the file name string.
-        val fileNameString = fileNameEditText.text.toString()
-
-        // Get a handle for the about version linear layout.
-        val aboutVersionLinearLayout = findViewById<LinearLayout>(R.id.about_version_linearlayout)
-
-        // Process the save event according to the type.
-        when (saveType) {
-            SaveDialog.SAVE_ABOUT_VERSION_TEXT -> try {
-                // Get a handle for the about version fragment.
-                val aboutVersionFragment = aboutPagerAdapter.getTabFragment(0) as AboutVersionFragment
-
-                // Get the about version text.
-                val aboutVersionString = aboutVersionFragment.aboutVersionString
-
-                // Create an input stream with the contents of about version.
-                val aboutVersionInputStream: InputStream = ByteArrayInputStream(aboutVersionString.toByteArray(StandardCharsets.UTF_8))
-
-                // Open an output stream.
-                val outputStream = contentResolver.openOutputStream(Uri.parse(fileNameString))!!
-
-                // Copy the input stream to the output stream.
-                aboutVersionInputStream.copyTo(outputStream, 2048)
-
-                // Close the streams.
-                aboutVersionInputStream.close()
-                outputStream.close()
-
-                // Display a snackbar with the saved about version information.
-                Snackbar.make(aboutVersionLinearLayout, getString(R.string.file_saved) + "  " + fileNameString, Snackbar.LENGTH_SHORT).show()
-            } catch (exception: Exception) {
-                // Display a snackbar with the error message.
-                Snackbar.make(aboutVersionLinearLayout, getString(R.string.error_saving_file) + "  " + exception.toString(), Snackbar.LENGTH_INDEFINITE).show()
-            }
-
-            SaveDialog.SAVE_ABOUT_VERSION_IMAGE ->
-                // Save the about version image.
-                SaveAboutVersionImage(this, fileNameString, aboutVersionLinearLayout).execute()
-        }
-    }
 }
index 23e6d525d44dfecd441d60a60f325999622df2dd..e555f1943e062129802e4ceb2f86ca565b4e35b7 100644 (file)
@@ -21,7 +21,6 @@ package com.stoutner.privacybrowser.activities
 
 import android.content.ClipData
 import android.content.ClipboardManager
-import android.content.Intent
 import android.net.Uri
 import android.os.Build
 import android.os.Bundle
@@ -30,20 +29,19 @@ import android.util.TypedValue
 import android.view.Menu
 import android.view.MenuItem
 import android.view.WindowManager
-import android.widget.EditText
 import android.widget.TextView
 import android.widget.ScrollView
 
+import androidx.activity.result.contract.ActivityResultContracts
 import androidx.appcompat.app.AppCompatActivity
 import androidx.appcompat.widget.Toolbar
-import androidx.fragment.app.DialogFragment
 import androidx.preference.PreferenceManager
 import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
 
 import com.google.android.material.snackbar.Snackbar
+import com.stoutner.privacybrowser.BuildConfig
 
 import com.stoutner.privacybrowser.R
-import com.stoutner.privacybrowser.dialogs.SaveDialog
 
 import java.io.BufferedReader
 import java.io.IOException
@@ -54,7 +52,7 @@ import java.nio.charset.StandardCharsets
 // Define the class constants.
 private const val SCROLLVIEW_POSITION = "scrollview_position"
 
-class LogcatActivity : AppCompatActivity(), SaveDialog.SaveListener {
+class LogcatActivity : AppCompatActivity() {
     // Define the class variables.
     private var scrollViewYPositionInt = 0
 
@@ -63,6 +61,50 @@ class LogcatActivity : AppCompatActivity(), SaveDialog.SaveListener {
     private lateinit var logcatScrollView: ScrollView
     private lateinit var logcatTextView: TextView
 
+    // Define the save logcat activity result launcher.  It must be defined before `onCreate()` is run or the app will crash.
+    private val saveLogcatActivityResultLauncher = registerForActivityResult(ActivityResultContracts.CreateDocument()) { fileNameUri: Uri? ->
+        // Only save the file if the URI is not null, which happens if the user exited the file picker by pressing back.
+        if (fileNameUri != null) {
+            try {
+                // Get the logcat string.
+                val logcatString = logcatTextView.text.toString()
+
+                // Open an output stream.
+                val outputStream = contentResolver.openOutputStream(fileNameUri)!!
+
+                // Write the logcat string to the output stream.
+                outputStream.write(logcatString.toByteArray(StandardCharsets.UTF_8))
+
+                // Close the output stream.
+                outputStream.close()
+
+                // Initialize the file name string from the file name URI last path segment.
+                var fileNameString = fileNameUri.lastPathSegment
+
+                // Query the exact file name if the API >= 26.
+                if (Build.VERSION.SDK_INT >= 26) {
+                    // Get a cursor from the content resolver.
+                    val contentResolverCursor = contentResolver.query(fileNameUri, null, null, null)!!
+
+                    // Move to the fist row.
+                    contentResolverCursor.moveToFirst()
+
+                    // Get the file name from the cursor.
+                    fileNameString = contentResolverCursor.getString(contentResolverCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME))
+
+                    // Close the cursor.
+                    contentResolverCursor.close()
+                }
+
+                // Display a snackbar with the saved logcat information.
+                Snackbar.make(logcatTextView, getString(R.string.saved, fileNameString), Snackbar.LENGTH_SHORT).show()
+            } catch (exception: Exception) {
+                // Display a snackbar with the error message.
+                Snackbar.make(logcatTextView, getString(R.string.error_saving_logcat, exception.toString()), Snackbar.LENGTH_INDEFINITE).show()
+            }
+        }
+    }
+
     public override fun onCreate(savedInstanceState: Bundle?) {
         // Get a handle for the shared preferences.
         val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
@@ -164,11 +206,8 @@ class LogcatActivity : AppCompatActivity(), SaveDialog.SaveListener {
             }
 
             R.id.save -> {  // Save was selected.
-                // Instantiate the save alert dialog.
-                val saveDialogFragment: DialogFragment = SaveDialog.save(SaveDialog.SAVE_LOGCAT)
-
-                // Show the save alert dialog.
-                saveDialogFragment.show(supportFragmentManager, getString(R.string.save_logcat))
+                // Open the file picker.
+                saveLogcatActivityResultLauncher.launch(getString(R.string.privacy_browser_logcat_txt, BuildConfig.VERSION_NAME))
 
                 // Consume the event.
                 true
@@ -239,83 +278,4 @@ class LogcatActivity : AppCompatActivity(), SaveDialog.SaveListener {
         // Stop the swipe to refresh animation if it is displayed.
         swipeRefreshLayout.isRefreshing = false
     }
-
-    // The activity result is called after browsing for a file in the save alert dialog.
-    public override fun onActivityResult(requestCode: Int, resultCode: Int, returnedIntent: Intent?) {
-        // Run the default commands.
-        super.onActivityResult(requestCode, resultCode, returnedIntent)
-
-        // Only do something if the user didn't press back from the file picker.
-        if (resultCode == RESULT_OK) {
-            // Get a handle for the save dialog fragment.
-            val saveDialogFragment = supportFragmentManager.findFragmentByTag(getString(R.string.save_logcat)) as DialogFragment?
-
-            // Only update the file name if the dialog still exists.
-            if (saveDialogFragment != null) {
-                // Get a handle for the save dialog.
-                val saveDialog = saveDialogFragment.dialog!!
-
-                // Get a handle for the file name edit text.
-                val fileNameEditText = saveDialog.findViewById<EditText>(R.id.file_name_edittext)
-
-                // Get the file name URI from the intent.
-                val fileNameUri = returnedIntent!!.data
-
-                // Get the file name string from the URI.
-                val fileNameString = fileNameUri.toString()
-
-                // Set the file name text.
-                fileNameEditText.setText(fileNameString)
-
-                // Move the cursor to the end of the file name edit text.
-                fileNameEditText.setSelection(fileNameString.length)
-            }
-        }
-    }
-
-    override fun onSave(saveType: Int, dialogFragment: DialogFragment) {
-        // Get a handle for the dialog.
-        val dialog = dialogFragment.dialog!!
-
-        // Get a handle for the file name edit text.
-        val fileNameEditText = dialog.findViewById<EditText>(R.id.file_name_edittext)
-
-        // Get the file path string.
-        var fileNameString = fileNameEditText.text.toString()
-
-        try {
-            // Get the logcat as a string.
-            val logcatString = logcatTextView.text.toString()
-
-            // Open an output stream.
-            val outputStream = contentResolver.openOutputStream(Uri.parse(fileNameString))!!
-
-            // Write the logcat string to the output stream.
-            outputStream.write(logcatString.toByteArray(StandardCharsets.UTF_8))
-
-            // Close the output stream.
-            outputStream.close()
-
-            // Get the actual file name if the API >= 26.
-            if (Build.VERSION.SDK_INT >= 26) {
-                // Get a cursor from the content resolver.
-                val contentResolverCursor = contentResolver.query(Uri.parse(fileNameString), null, null, null)!!
-
-                // Move to the first row.
-                contentResolverCursor.moveToFirst()
-
-                // Get the file name from the cursor.
-                fileNameString = contentResolverCursor.getString(contentResolverCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME))
-
-                // Close the cursor.
-                contentResolverCursor.close()
-            }
-
-            // Display a snackbar with the saved logcat information.
-            Snackbar.make(logcatTextView, getString(R.string.file_saved) + "  " + fileNameString, Snackbar.LENGTH_SHORT).show()
-        } catch (exception: Exception) {
-            // Display a snackbar with the error message.
-            Snackbar.make(logcatTextView, getString(R.string.error_saving_file) + "  " + exception.toString(), Snackbar.LENGTH_INDEFINITE).show()
-        }
-    }
 }
\ No newline at end of file
index 377ce7be249e6dd0a5e5daba6b02cd8d91f25d3c..1c15bc9c56c9dea22c4097509818d5eb1e2ec7e8 100644 (file)
 package com.stoutner.privacybrowser.asynctasks;
 
 import android.app.Activity;
+import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
 import android.net.Uri;
 import android.os.AsyncTask;
+import android.os.Build;
+import android.provider.OpenableColumns;
 import android.widget.LinearLayout;
 
 import com.google.android.material.snackbar.Snackbar;
@@ -35,26 +38,45 @@ import java.io.OutputStream;
 import java.lang.ref.WeakReference;
 
 public class SaveAboutVersionImage extends AsyncTask<Void, Void, String> {
+    // Declare the class constants.
+    private final String SUCCESS = "Success";
+
     // Declare the weak references.
     private final WeakReference<Activity> activityWeakReference;
     private final WeakReference<LinearLayout> aboutVersionLinearLayoutWeakReference;
 
-    // Declare the class constants.
-    private final String SUCCESS = "Success";
-
     // Declare the class variables.
     private Snackbar savingImageSnackbar;
     private Bitmap aboutVersionBitmap;
+    private final Uri fileNameUri;
     private final String fileNameString;
 
     // The public constructor.
-    public SaveAboutVersionImage(Activity activity, String fileNameString, LinearLayout aboutVersionLinearLayout) {
+    public SaveAboutVersionImage(Activity activity, Uri fileNameUri, LinearLayout aboutVersionLinearLayout) {
         // Populate the weak references.
         activityWeakReference = new WeakReference<>(activity);
         aboutVersionLinearLayoutWeakReference = new WeakReference<>(aboutVersionLinearLayout);
 
         // Store the class variables.
-        this.fileNameString = fileNameString;
+        this.fileNameUri = fileNameUri;
+
+        // Query the exact file name if the API >= 26.
+        if (Build.VERSION.SDK_INT >= 26) {
+            // Get a cursor from the content resolver.
+            Cursor contentResolverCursor = activity.getContentResolver().query(fileNameUri, null, null, null);
+
+            // Move to the first row.
+            contentResolverCursor.moveToFirst();
+
+            // Get the file name from the cursor.
+            fileNameString = contentResolverCursor.getString(contentResolverCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));
+
+            // Close the cursor.
+            contentResolverCursor.close();
+        } else {
+            // Use the URI last path segment as the file name string.
+            fileNameString = fileNameUri.getLastPathSegment();
+        }
     }
 
     // `onPreExecute()` operates on the UI thread.
@@ -107,7 +129,7 @@ public class SaveAboutVersionImage extends AsyncTask<Void, Void, String> {
 
         try {
             // Open an output stream.
-            OutputStream outputStream = activity.getContentResolver().openOutputStream(Uri.parse(fileNameString));
+            OutputStream outputStream = activity.getContentResolver().openOutputStream(fileNameUri);
 
             // Write the webpage image to the image file.
             aboutVersionByteArrayOutputStream.writeTo(outputStream);
diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveDialog.kt
deleted file mode 100644 (file)
index 4c8b75a..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
- *
- * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
- *
- * Privacy Browser is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Privacy Browser is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.stoutner.privacybrowser.dialogs
-
-import android.app.Dialog
-import android.content.Context
-import android.content.DialogInterface
-import android.content.Intent
-import android.os.Bundle
-import android.text.Editable
-import android.text.TextWatcher
-import android.view.WindowManager
-import android.widget.Button
-import android.widget.EditText
-
-import androidx.appcompat.app.AlertDialog
-import androidx.fragment.app.DialogFragment
-import androidx.preference.PreferenceManager
-
-import com.stoutner.privacybrowser.R
-
-// Define the class constants.
-private const val SAVE_TYPE = "save_type"
-
-class SaveDialog : DialogFragment() {
-    // Declare the class variables.
-    private lateinit var saveListener: SaveListener
-    private lateinit var fileName: String
-
-    // The public interface is used to send information back to the parent activity.
-    interface SaveListener {
-        fun onSave(saveType: Int, dialogFragment: DialogFragment)
-    }
-
-    override fun onAttach(context: Context) {
-        // Run the default commands.
-        super.onAttach(context)
-
-        // Get a handle for the save listener from the launching context.
-        saveListener = context as SaveListener
-    }
-
-    companion object {
-        // Define the companion object constants.  These can be moved to class constants once all of the code has transitioned to Kotlin.
-        const val SAVE_LOGCAT = 0
-        const val SAVE_ABOUT_VERSION_TEXT = 1
-        const val SAVE_ABOUT_VERSION_IMAGE = 2
-
-        // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin.
-        @JvmStatic
-        fun save(saveType: Int): SaveDialog {
-            // Create an arguments bundle.
-            val argumentsBundle = Bundle()
-
-            // Store the arguments in the bundle.
-            argumentsBundle.putInt(SAVE_TYPE, saveType)
-
-            // Create a new instance of the save dialog.
-            val saveDialog = SaveDialog()
-
-            // Add the arguments bundle to the new dialog.
-            saveDialog.arguments = argumentsBundle
-
-            // Return the new dialog.
-            return saveDialog
-        }
-    }
-
-    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
-        // Get the arguments from the bundle.
-        val saveType = requireArguments().getInt(SAVE_TYPE)
-
-        // Use an alert dialog builder to create the alert dialog.
-        val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
-
-        // Set the title and the icon according to the save type.
-        when (saveType) {
-            SAVE_LOGCAT -> {
-                // Set the title.
-                dialogBuilder.setTitle(R.string.save_logcat)
-
-                // Set the icon according to the theme.
-                dialogBuilder.setIconAttribute(R.attr.saveBlueIcon)
-            }
-
-            SAVE_ABOUT_VERSION_TEXT -> {
-                // Set the title.
-                dialogBuilder.setTitle(R.string.save_text)
-
-                // Set the icon according to the theme.
-                dialogBuilder.setIconAttribute(R.attr.saveTextBlueIcon)
-            }
-
-            SAVE_ABOUT_VERSION_IMAGE -> {
-                // Set the title.
-                dialogBuilder.setTitle(R.string.save_image)
-
-                // Set the icon according to the theme.
-                dialogBuilder.setIconAttribute(R.attr.imagesBlueIcon)
-            }
-        }
-
-        // Set the view.
-        dialogBuilder.setView(R.layout.save_dialog)
-
-        // Set the cancel button listener.  Using `null` as the listener closes the dialog without doing anything else.
-        dialogBuilder.setNegativeButton(R.string.cancel, null)
-
-        // Set the save button listener.
-        dialogBuilder.setPositiveButton(R.string.save) { _: DialogInterface?, _: Int ->
-            // Return the dialog fragment to the parent activity.
-            saveListener.onSave(saveType, this)
-        }
-
-        // Create an alert dialog from the builder.
-        val alertDialog = dialogBuilder.create()
-
-        // Get a handle for the shared preferences.
-        val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
-
-        // Get the screenshot preference.
-        val allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false)
-
-        // Disable screenshots if not allowed.
-        if (!allowScreenshots) {
-            alertDialog.window!!.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
-        }
-
-        // The alert dialog must be shown before items in the layout can be modified.
-        alertDialog.show()
-
-        // Get handles for the layout items.
-        val fileNameEditText = alertDialog.findViewById<EditText>(R.id.file_name_edittext)!!
-        val browseButton = alertDialog.findViewById<Button>(R.id.browse_button)!!
-        val saveButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE)
-
-        // Initially disable the save button.
-        saveButton.isEnabled = false
-
-        // Update the status of the save button when the file name changes.
-        fileNameEditText.addTextChangedListener(object : TextWatcher {
-            override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {
-                // Do nothing.
-            }
-
-            override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
-                // Do nothing.
-            }
-
-            override fun afterTextChanged(s: Editable) {
-                // Get the current file name.
-                val fileNameString = fileNameEditText.text.toString()
-
-                // Enable the save button if the file name is populated.
-                saveButton.isEnabled = fileNameString.isNotEmpty()
-            }
-        })
-
-        // Set the file name according to the type.
-        when (saveType) {
-            SAVE_LOGCAT -> fileName = getString(R.string.privacy_browser_logcat_txt)
-            SAVE_ABOUT_VERSION_TEXT -> fileName = getString(R.string.privacy_browser_version_txt)
-            SAVE_ABOUT_VERSION_IMAGE -> fileName = getString(R.string.privacy_browser_version_png)
-        }
-
-        // Handle clicks on the browse button.
-        browseButton.setOnClickListener {
-            // Create the file picker intent.
-            val browseIntent = Intent(Intent.ACTION_CREATE_DOCUMENT)
-
-            // Set the intent MIME type to include all files so that everything is visible.
-            browseIntent.type = "*/*"
-
-            // Set the initial file name.
-            browseIntent.putExtra(Intent.EXTRA_TITLE, fileName)
-
-            // Request a file that can be opened.
-            browseIntent.addCategory(Intent.CATEGORY_OPENABLE)
-
-            // Launch the file picker.  There is only one `startActivityForResult()`, so the request code is simply set to 0, but it must be run under `activity` so the response is processed correctly.
-            requireActivity().startActivityForResult(browseIntent, 0)
-        }
-
-        // Return the alert dialog.
-        return alertDialog
-    }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.java b/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.java
deleted file mode 100644 (file)
index 9436110..0000000
+++ /dev/null
@@ -1,836 +0,0 @@
-/*
- * Copyright © 2016-2020 Soren Stoutner <soren@stoutner.com>.
- *
- * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
- *
- * Privacy Browser is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Privacy Browser is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package com.stoutner.privacybrowser.fragments;
-
-import android.annotation.SuppressLint;
-import android.app.Activity;
-import android.app.ActivityManager;
-import android.content.ClipData;
-import android.content.ClipboardManager;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.Signature;
-import android.content.res.Configuration;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.Handler;
-import android.text.SpannableStringBuilder;
-import android.text.Spanned;
-import android.text.style.ForegroundColorSpan;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.webkit.WebView;
-import android.widget.TextView;
-
-import com.google.android.material.snackbar.Snackbar;
-import com.stoutner.privacybrowser.BuildConfig;
-import com.stoutner.privacybrowser.R;
-import com.stoutner.privacybrowser.dialogs.SaveDialog;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.security.Principal;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.text.DateFormat;
-import java.text.NumberFormat;
-import java.util.Date;
-
-import androidx.annotation.NonNull;
-import androidx.fragment.app.DialogFragment;
-import androidx.fragment.app.Fragment;
-import androidx.webkit.WebViewCompat;
-
-public class AboutVersionFragment extends Fragment {
-    // Declare the class constants.
-    final static String BLOCKLIST_VERSIONS = "blocklist_versions";
-    final long MEBIBYTE = 1048576;
-
-    // Declare the class variables.
-    private boolean updateMemoryUsageBoolean = true;
-    private String[] blocklistVersions;
-    private View aboutVersionLayout;
-    private String appConsumedMemoryLabel;
-    private String appAvailableMemoryLabel;
-    private String appTotalMemoryLabel;
-    private String appMaximumMemoryLabel;
-    private String systemConsumedMemoryLabel;
-    private String systemAvailableMemoryLabel;
-    private String systemTotalMemoryLabel;
-    private Runtime runtime;
-    private ActivityManager activityManager;
-    private ActivityManager.MemoryInfo memoryInfo;
-    private NumberFormat numberFormat;
-    private ForegroundColorSpan blueColorSpan;
-
-    // Declare the class views.
-    private TextView privacyBrowserTextView;
-    private TextView versionTextView;
-    private TextView hardwareTextView;
-    private TextView brandTextView;
-    private TextView manufacturerTextView;
-    private TextView modelTextView;
-    private TextView deviceTextView;
-    private TextView bootloaderTextView;
-    private TextView radioTextView;
-    private TextView softwareTextView;
-    private TextView androidTextView;
-    private TextView securityPatchTextView;
-    private TextView buildTextView;
-    private TextView webViewProviderTextView;
-    private TextView webViewVersionTextView;
-    private TextView orbotTextView;
-    private TextView i2pTextView;
-    private TextView openKeychainTextView;
-    private TextView memoryUsageTextView;
-    private TextView appConsumedMemoryTextView;
-    private TextView appAvailableMemoryTextView;
-    private TextView appTotalMemoryTextView;
-    private TextView appMaximumMemoryTextView;
-    private TextView systemConsumedMemoryTextView;
-    private TextView systemAvailableMemoryTextView;
-    private TextView systemTotalMemoryTextView;
-    private TextView blocklistsTextView;
-    private TextView easyListTextView;
-    private TextView easyPrivacyTextView;
-    private TextView fanboyAnnoyanceTextView;
-    private TextView fanboySocialTextView;
-    private TextView ultraListTextView;
-    private TextView ultraPrivacyTextView;
-    private TextView packageSignatureTextView;
-    private TextView certificateIssuerDnTextView;
-    private TextView certificateSubjectDnTextView;
-    private TextView certificateStartDateTextView;
-    private TextView certificateEndDateTextView;
-    private TextView certificateVersionTextView;
-    private TextView certificateSerialNumberTextView;
-    private TextView certificateSignatureAlgorithmTextView;
-
-    public static AboutVersionFragment createTab(String[] blocklistVersions) {
-        // Create an arguments bundle.
-        Bundle argumentsBundle = new Bundle();
-
-        // Store the arguments in the bundle.
-        argumentsBundle.putStringArray(BLOCKLIST_VERSIONS, blocklistVersions);
-
-        // Create a new instance of the tab fragment.
-        AboutVersionFragment aboutVersionFragment = new AboutVersionFragment();
-
-        // Add the arguments bundle to the fragment.
-        aboutVersionFragment.setArguments(argumentsBundle);
-
-        // Return the new fragment.
-        return aboutVersionFragment;
-    }
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        // Run the default commands.
-        super.onCreate(savedInstanceState);
-
-        // Get a handle for the arguments.
-        Bundle arguments = getArguments();
-
-        // Remove the incorrect lint warning below that the arguments might be null.
-        assert arguments != null;
-
-        // Store the arguments in class variables.
-        blocklistVersions = arguments.getStringArray(BLOCKLIST_VERSIONS);
-
-        // Enable the options menu for this fragment.
-        setHasOptionsMenu(true);
-    }
-
-    @Override
-    public View onCreateView(@NonNull LayoutInflater layoutInflater, ViewGroup container, Bundle savedInstanceState) {
-        // Get a handle for the context.
-        Context context = getContext();
-
-        // Remove the incorrect lint warning below that the context might be null.
-        assert context != null;
-
-        // Get the current theme status.
-        int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-        // Inflate the layout.  Setting false at the end of inflater.inflate does not attach the inflated layout as a child of container.  The fragment will take care of attaching the root automatically.
-        aboutVersionLayout = layoutInflater.inflate(R.layout.about_version, container, false);
-
-        // Get handles for the views.
-        privacyBrowserTextView = aboutVersionLayout.findViewById(R.id.privacy_browser_textview);
-        versionTextView = aboutVersionLayout.findViewById(R.id.version);
-        hardwareTextView = aboutVersionLayout.findViewById(R.id.hardware);
-        brandTextView = aboutVersionLayout.findViewById(R.id.brand);
-        manufacturerTextView = aboutVersionLayout.findViewById(R.id.manufacturer);
-        modelTextView = aboutVersionLayout.findViewById(R.id.model);
-        deviceTextView = aboutVersionLayout.findViewById(R.id.device);
-        bootloaderTextView = aboutVersionLayout.findViewById(R.id.bootloader);
-        radioTextView = aboutVersionLayout.findViewById(R.id.radio);
-        softwareTextView = aboutVersionLayout.findViewById(R.id.software);
-        androidTextView = aboutVersionLayout.findViewById(R.id.android);
-        securityPatchTextView = aboutVersionLayout.findViewById(R.id.security_patch);
-        buildTextView = aboutVersionLayout.findViewById(R.id.build);
-        webViewProviderTextView = aboutVersionLayout.findViewById(R.id.webview_provider);
-        webViewVersionTextView = aboutVersionLayout.findViewById(R.id.webview_version);
-        orbotTextView = aboutVersionLayout.findViewById(R.id.orbot);
-        i2pTextView = aboutVersionLayout.findViewById(R.id.i2p);
-        openKeychainTextView = aboutVersionLayout.findViewById(R.id.open_keychain);
-        memoryUsageTextView = aboutVersionLayout.findViewById(R.id.memory_usage);
-        appConsumedMemoryTextView = aboutVersionLayout.findViewById(R.id.app_consumed_memory);
-        appAvailableMemoryTextView = aboutVersionLayout.findViewById(R.id.app_available_memory);
-        appTotalMemoryTextView = aboutVersionLayout.findViewById(R.id.app_total_memory);
-        appMaximumMemoryTextView = aboutVersionLayout.findViewById(R.id.app_maximum_memory);
-        systemConsumedMemoryTextView = aboutVersionLayout.findViewById(R.id.system_consumed_memory);
-        systemAvailableMemoryTextView = aboutVersionLayout.findViewById(R.id.system_available_memory);
-        systemTotalMemoryTextView = aboutVersionLayout.findViewById(R.id.system_total_memory);
-        blocklistsTextView = aboutVersionLayout.findViewById(R.id.blocklists);
-        easyListTextView = aboutVersionLayout.findViewById(R.id.easylist);
-        easyPrivacyTextView = aboutVersionLayout.findViewById(R.id.easyprivacy);
-        fanboyAnnoyanceTextView = aboutVersionLayout.findViewById(R.id.fanboy_annoyance);
-        fanboySocialTextView = aboutVersionLayout.findViewById(R.id.fanboy_social);
-        ultraListTextView = aboutVersionLayout.findViewById(R.id.ultralist);
-        ultraPrivacyTextView = aboutVersionLayout.findViewById(R.id.ultraprivacy);
-        packageSignatureTextView = aboutVersionLayout.findViewById(R.id.package_signature);
-        certificateIssuerDnTextView = aboutVersionLayout.findViewById(R.id.certificate_issuer_dn);
-        certificateSubjectDnTextView = aboutVersionLayout.findViewById(R.id.certificate_subject_dn);
-        certificateStartDateTextView = aboutVersionLayout.findViewById(R.id.certificate_start_date);
-        certificateEndDateTextView = aboutVersionLayout.findViewById(R.id.certificate_end_date);
-        certificateVersionTextView = aboutVersionLayout.findViewById(R.id.certificate_version);
-        certificateSerialNumberTextView = aboutVersionLayout.findViewById(R.id.certificate_serial_number);
-        certificateSignatureAlgorithmTextView = aboutVersionLayout.findViewById(R.id.certificate_signature_algorithm);
-
-        // Setup the labels.
-        String version = getString(R.string.version) + " " + BuildConfig.VERSION_NAME + " (" + getString(R.string.version_code) + " " + BuildConfig.VERSION_CODE + ")";
-        String brandLabel = getString(R.string.brand) + "  ";
-        String manufacturerLabel = getString(R.string.manufacturer) + "  ";
-        String modelLabel = getString(R.string.model) + "  ";
-        String deviceLabel = getString(R.string.device) + "  ";
-        String bootloaderLabel = getString(R.string.bootloader) + "  ";
-        String androidLabel = getString(R.string.android) + "  ";
-        String buildLabel = getString(R.string.build) + "  ";
-        String webViewVersionLabel = getString(R.string.webview_version) + "  ";
-        appConsumedMemoryLabel = getString(R.string.app_consumed_memory) + "  ";
-        appAvailableMemoryLabel = getString(R.string.app_available_memory) + "  ";
-        appTotalMemoryLabel = getString(R.string.app_total_memory) + "  ";
-        appMaximumMemoryLabel = getString(R.string.app_maximum_memory) + "  ";
-        systemConsumedMemoryLabel = getString(R.string.system_consumed_memory) + "  ";
-        systemAvailableMemoryLabel = getString(R.string.system_available_memory) + "  ";
-        systemTotalMemoryLabel = getString(R.string.system_total_memory) + "  ";
-        String easyListLabel = getString(R.string.easylist_label) + "  ";
-        String easyPrivacyLabel = getString(R.string.easyprivacy_label) + "  ";
-        String fanboyAnnoyanceLabel = getString(R.string.fanboy_annoyance_label) + "  ";
-        String fanboySocialLabel = getString(R.string.fanboy_social_label) + "  ";
-        String ultraListLabel = getString(R.string.ultralist_label) + "  ";
-        String ultraPrivacyLabel = getString(R.string.ultraprivacy_label) + "  ";
-        String issuerDNLabel = getString(R.string.issuer_dn) + "  ";
-        String subjectDNLabel = getString(R.string.subject_dn) + "  ";
-        String startDateLabel = getString(R.string.start_date) + "  ";
-        String endDateLabel = getString(R.string.end_date) + "  ";
-        String certificateVersionLabel = getString(R.string.certificate_version) + "  ";
-        String serialNumberLabel = getString(R.string.serial_number) + "  ";
-        String signatureAlgorithmLabel = getString(R.string.signature_algorithm) + "  ";
-
-        // The WebView layout is only used to get the default user agent from `bare_webview`.  It is not used to render content on the screen.
-        // Once the minimum API >= 26 this can be accomplished with the WebView package info.
-        View webViewLayout = layoutInflater.inflate(R.layout.bare_webview, container, false);
-        WebView tabLayoutWebView = webViewLayout.findViewById(R.id.bare_webview);
-        String userAgentString =  tabLayoutWebView.getSettings().getUserAgentString();
-
-        // Get the device's information and store it in strings.
-        String brand = Build.BRAND;
-        String manufacturer = Build.MANUFACTURER;
-        String model = Build.MODEL;
-        String device = Build.DEVICE;
-        String bootloader = Build.BOOTLOADER;
-        String radio = Build.getRadioVersion();
-        String android = Build.VERSION.RELEASE + " (" + getString(R.string.api) + " " + Build.VERSION.SDK_INT + ")";
-        String build = Build.DISPLAY;
-        // Select the substring that begins after `Chrome/` and goes until the next ` `.
-        String webView = userAgentString.substring(userAgentString.indexOf("Chrome/") + 7, userAgentString.indexOf(" ", userAgentString.indexOf("Chrome/")));
-
-        // Get the Orbot version name if Orbot is installed.
-        String orbot;
-        try {
-            // Store the version name.
-            orbot = context.getPackageManager().getPackageInfo("org.torproject.android", 0).versionName;
-        } catch (PackageManager.NameNotFoundException exception) {  // Orbot is not installed.
-            orbot = "";
-        }
-
-        // Get the I2P version name if I2P is installed.
-        String i2p;
-        try {
-            // Store the version name.
-            i2p = context.getPackageManager().getPackageInfo("net.i2p.android.router", 0).versionName;
-        } catch (PackageManager.NameNotFoundException exception) {  // I2P is not installed.
-            i2p = "";
-        }
-
-        // Get the OpenKeychain version name if it is installed.
-        String openKeychain;
-        try {
-            // Store the version name.
-            openKeychain = context.getPackageManager().getPackageInfo("org.sufficientlysecure.keychain", 0).versionName;
-        } catch (PackageManager.NameNotFoundException exception) {  // OpenKeychain is not installed.
-            openKeychain = "";
-        }
-
-        // Create a spannable string builder for the hardware and software text views that needs multiple colors of text.
-        SpannableStringBuilder brandStringBuilder = new SpannableStringBuilder(brandLabel + brand);
-        SpannableStringBuilder manufacturerStringBuilder = new SpannableStringBuilder(manufacturerLabel + manufacturer);
-        SpannableStringBuilder modelStringBuilder = new SpannableStringBuilder(modelLabel + model);
-        SpannableStringBuilder deviceStringBuilder = new SpannableStringBuilder(deviceLabel + device);
-        SpannableStringBuilder bootloaderStringBuilder = new SpannableStringBuilder(bootloaderLabel + bootloader);
-        SpannableStringBuilder androidStringBuilder = new SpannableStringBuilder(androidLabel + android);
-        SpannableStringBuilder buildStringBuilder = new SpannableStringBuilder(buildLabel + build);
-        SpannableStringBuilder webViewVersionStringBuilder = new SpannableStringBuilder(webViewVersionLabel + webView);
-        SpannableStringBuilder easyListStringBuilder = new SpannableStringBuilder(easyListLabel + blocklistVersions[0]);
-        SpannableStringBuilder easyPrivacyStringBuilder = new SpannableStringBuilder(easyPrivacyLabel + blocklistVersions[1]);
-        SpannableStringBuilder fanboyAnnoyanceStringBuilder = new SpannableStringBuilder(fanboyAnnoyanceLabel + blocklistVersions[2]);
-        SpannableStringBuilder fanboySocialStringBuilder = new SpannableStringBuilder(fanboySocialLabel + blocklistVersions[3]);
-        SpannableStringBuilder ultraListStringBuilder = new SpannableStringBuilder(ultraListLabel + blocklistVersions[4]);
-        SpannableStringBuilder ultraPrivacyStringBuilder = new SpannableStringBuilder(ultraPrivacyLabel + blocklistVersions[5]);
-
-        // Set the blue color span according to the theme.  The deprecated `getResources()` must be used until the minimum API >= 23.
-        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-            blueColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.blue_700));
-        } else {
-            blueColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.violet_700));
-        }
-
-        // Setup the spans to display the device information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
-        brandStringBuilder.setSpan(blueColorSpan, brandLabel.length(), brandStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        manufacturerStringBuilder.setSpan(blueColorSpan, manufacturerLabel.length(), manufacturerStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        modelStringBuilder.setSpan(blueColorSpan, modelLabel.length(), modelStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        deviceStringBuilder.setSpan(blueColorSpan, deviceLabel.length(), deviceStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        bootloaderStringBuilder.setSpan(blueColorSpan, bootloaderLabel.length(), bootloaderStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        androidStringBuilder.setSpan(blueColorSpan, androidLabel.length(), androidStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        buildStringBuilder.setSpan(blueColorSpan, buildLabel.length(), buildStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        webViewVersionStringBuilder.setSpan(blueColorSpan, webViewVersionLabel.length(), webViewVersionStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        easyListStringBuilder.setSpan(blueColorSpan, easyListLabel.length(), easyListStringBuilder.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
-        easyPrivacyStringBuilder.setSpan(blueColorSpan, easyPrivacyLabel.length(), easyPrivacyStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        fanboyAnnoyanceStringBuilder.setSpan(blueColorSpan, fanboyAnnoyanceLabel.length(), fanboyAnnoyanceStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        fanboySocialStringBuilder.setSpan(blueColorSpan, fanboySocialLabel.length(), fanboySocialStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        ultraListStringBuilder.setSpan(blueColorSpan, ultraListLabel.length(), ultraListStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        ultraPrivacyStringBuilder.setSpan(blueColorSpan, ultraPrivacyLabel.length(), ultraPrivacyStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-
-        // Display the strings in the text boxes.
-        versionTextView.setText(version);
-        brandTextView.setText(brandStringBuilder);
-        manufacturerTextView.setText(manufacturerStringBuilder);
-        modelTextView.setText(modelStringBuilder);
-        deviceTextView.setText(deviceStringBuilder);
-        bootloaderTextView.setText(bootloaderStringBuilder);
-        androidTextView.setText(androidStringBuilder);
-        buildTextView.setText(buildStringBuilder);
-        webViewVersionTextView.setText(webViewVersionStringBuilder);
-        easyListTextView.setText(easyListStringBuilder);
-        easyPrivacyTextView.setText(easyPrivacyStringBuilder);
-        fanboyAnnoyanceTextView.setText(fanboyAnnoyanceStringBuilder);
-        fanboySocialTextView.setText(fanboySocialStringBuilder);
-        ultraListTextView.setText(ultraListStringBuilder);
-        ultraPrivacyTextView.setText(ultraPrivacyStringBuilder);
-
-        // Only populate the radio text view if there is a radio in the device.
-        // Null must be checked because some Samsung tablets report a null value for the radio instead of an empty string.  Grrrr.  <https://redmine.stoutner.com/issues/701>
-        if ((radio != null) && !radio.isEmpty()) {
-            String radioLabel = getString(R.string.radio) + "  ";
-            SpannableStringBuilder radioStringBuilder = new SpannableStringBuilder(radioLabel + radio);
-            radioStringBuilder.setSpan(blueColorSpan, radioLabel.length(), radioStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-            radioTextView.setText(radioStringBuilder);
-        } else {  // This device does not have a radio.
-            radioTextView.setVisibility(View.GONE);
-        }
-
-        // Build.VERSION.SECURITY_PATCH is only available for SDK_INT >= 23.
-        if (Build.VERSION.SDK_INT >= 23) {
-            String securityPatchLabel = getString(R.string.security_patch) + "  ";
-            String securityPatch = Build.VERSION.SECURITY_PATCH;
-            SpannableStringBuilder securityPatchStringBuilder = new SpannableStringBuilder(securityPatchLabel + securityPatch);
-            securityPatchStringBuilder.setSpan(blueColorSpan, securityPatchLabel.length(), securityPatchStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-            securityPatchTextView.setText(securityPatchStringBuilder);
-        } else {  // The API < 23.
-            // Hide the security patch text view.
-            securityPatchTextView.setVisibility(View.GONE);
-        }
-
-        // Only populate the WebView provider if the SDK >= 21.
-        if (Build.VERSION.SDK_INT >= 21) {
-            // Create the WebView provider label.
-            String webViewProviderLabel = getString(R.string.webview_provider) + "  ";
-
-            // Get the current WebView package info.
-            PackageInfo webViewPackageInfo = WebViewCompat.getCurrentWebViewPackage(context);
-
-            // Remove the warning below that the package info might be null.
-            assert webViewPackageInfo != null;
-
-            // Get the WebView provider name.
-            String webViewPackageName = webViewPackageInfo.packageName;
-
-            // Create the spannable string builder.
-            SpannableStringBuilder webViewProviderStringBuilder = new SpannableStringBuilder(webViewProviderLabel + webViewPackageName);
-
-            // Apply the coloration.
-            webViewProviderStringBuilder.setSpan(blueColorSpan, webViewProviderLabel.length(), webViewProviderStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-
-            // Display the WebView provider.
-            webViewProviderTextView.setText(webViewProviderStringBuilder);
-        } else {  // The API < 21.
-            // Hide the WebView provider text view.
-            webViewProviderTextView.setVisibility(View.GONE);
-        }
-
-        // Only populate the Orbot text view if it is installed.
-        if (!orbot.isEmpty()) {
-            String orbotLabel = getString(R.string.orbot) + "  ";
-            SpannableStringBuilder orbotStringBuilder = new SpannableStringBuilder(orbotLabel + orbot);
-            orbotStringBuilder.setSpan(blueColorSpan, orbotLabel.length(), orbotStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-            orbotTextView.setText(orbotStringBuilder);
-        } else {  // Orbot is not installed.
-            orbotTextView.setVisibility(View.GONE);
-        }
-
-        // Only populate the I2P text view if it is installed.
-        if (!i2p.isEmpty()) {
-            String i2pLabel = getString(R.string.i2p)  + "  ";
-            SpannableStringBuilder i2pStringBuilder = new SpannableStringBuilder(i2pLabel + i2p);
-            i2pStringBuilder.setSpan(blueColorSpan, i2pLabel.length(), i2pStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-            i2pTextView.setText(i2pStringBuilder);
-        } else {  // I2P is not installed.
-            i2pTextView.setVisibility(View.GONE);
-        }
-
-        // Only populate the OpenKeychain text view if it is installed.
-        if (!openKeychain.isEmpty()) {
-            String openKeychainLabel = getString(R.string.openkeychain) + "  ";
-            SpannableStringBuilder openKeychainStringBuilder = new SpannableStringBuilder(openKeychainLabel + openKeychain);
-            openKeychainStringBuilder.setSpan(blueColorSpan, openKeychainLabel.length(), openKeychainStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-            openKeychainTextView.setText(openKeychainStringBuilder);
-        } else {  //OpenKeychain is not installed.
-            openKeychainTextView.setVisibility(View.GONE);
-        }
-
-        // Display the package signature.
-        try {
-            // Get the first package signature.  Suppress the lint warning about the need to be careful in implementing comparison of certificates for security purposes.
-            @SuppressLint("PackageManagerGetSignatures") Signature packageSignature = context.getPackageManager().getPackageInfo(context.getPackageName(),
-                    PackageManager.GET_SIGNATURES).signatures[0];
-
-            // Convert the signature to a byte array input stream.
-            InputStream certificateByteArrayInputStream = new ByteArrayInputStream(packageSignature.toByteArray());
-
-            // Display the certificate information on the screen.
-            try {
-                // Instantiate a `CertificateFactory`.
-                CertificateFactory certificateFactory = CertificateFactory.getInstance("X509");
-
-                // Generate an `X509Certificate`.
-                X509Certificate x509Certificate = (X509Certificate) certificateFactory.generateCertificate(certificateByteArrayInputStream);
-
-                // Store the individual sections of the certificate that we are interested in.
-                Principal issuerDNPrincipal = x509Certificate.getIssuerDN();
-                Principal subjectDNPrincipal = x509Certificate.getSubjectDN();
-                Date startDate = x509Certificate.getNotBefore();
-                Date endDate = x509Certificate.getNotAfter();
-                int certificateVersion = x509Certificate.getVersion();
-                BigInteger serialNumberBigInteger = x509Certificate.getSerialNumber();
-                String signatureAlgorithmNameString = x509Certificate.getSigAlgName();
-
-                // Create a `SpannableStringBuilder` for each `TextView` that needs multiple colors of text.
-                SpannableStringBuilder issuerDNStringBuilder = new SpannableStringBuilder(issuerDNLabel + issuerDNPrincipal.toString());
-                SpannableStringBuilder subjectDNStringBuilder = new SpannableStringBuilder(subjectDNLabel + subjectDNPrincipal.toString());
-                SpannableStringBuilder startDateStringBuilder = new SpannableStringBuilder(startDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(startDate));
-                SpannableStringBuilder endDataStringBuilder = new SpannableStringBuilder(endDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(endDate));
-                SpannableStringBuilder certificateVersionStringBuilder = new SpannableStringBuilder(certificateVersionLabel + certificateVersion);
-                SpannableStringBuilder serialNumberStringBuilder = new SpannableStringBuilder(serialNumberLabel + serialNumberBigInteger);
-                SpannableStringBuilder signatureAlgorithmStringBuilder = new SpannableStringBuilder(signatureAlgorithmLabel + signatureAlgorithmNameString);
-
-                // Setup the spans to display the device information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
-                issuerDNStringBuilder.setSpan(blueColorSpan, issuerDNLabel.length(), issuerDNStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                subjectDNStringBuilder.setSpan(blueColorSpan, subjectDNLabel.length(), subjectDNStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                startDateStringBuilder.setSpan(blueColorSpan, startDateLabel.length(), startDateStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                endDataStringBuilder.setSpan(blueColorSpan, endDateLabel.length(), endDataStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                certificateVersionStringBuilder.setSpan(blueColorSpan, certificateVersionLabel.length(), certificateVersionStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                serialNumberStringBuilder.setSpan(blueColorSpan, serialNumberLabel.length(), serialNumberStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                signatureAlgorithmStringBuilder.setSpan(blueColorSpan, signatureAlgorithmLabel.length(), signatureAlgorithmStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-
-                // Display the strings in the text boxes.
-                certificateIssuerDnTextView.setText(issuerDNStringBuilder);
-                certificateSubjectDnTextView.setText(subjectDNStringBuilder);
-                certificateStartDateTextView.setText(startDateStringBuilder);
-                certificateEndDateTextView.setText(endDataStringBuilder);
-                certificateVersionTextView.setText(certificateVersionStringBuilder);
-                certificateSerialNumberTextView.setText(serialNumberStringBuilder);
-                certificateSignatureAlgorithmTextView.setText(signatureAlgorithmStringBuilder);
-            } catch (CertificateException e) {
-                // Do nothing if there is a certificate error.
-            }
-
-            // Get a handle for the runtime.
-            runtime = Runtime.getRuntime();
-
-            // Get a handle for the activity.
-            Activity activity = getActivity();
-
-            // Remove the incorrect lint warning below that the activity might be null.
-            assert activity != null;
-
-            // Get a handle for the activity manager.
-            activityManager = (ActivityManager) activity.getSystemService(Context.ACTIVITY_SERVICE);
-
-            // Remove the incorrect lint warning below that the activity manager might be null.
-            assert activityManager != null;
-
-            // Instantiate a memory info variable.
-            memoryInfo = new ActivityManager.MemoryInfo();
-
-            // Define a number format.
-            numberFormat = NumberFormat.getInstance();
-
-            // Set the minimum and maximum number of fraction digits.
-            numberFormat.setMinimumFractionDigits(2);
-            numberFormat.setMaximumFractionDigits(2);
-
-            // Update the memory usage.
-            updateMemoryUsage(getActivity());
-        } catch (PackageManager.NameNotFoundException e) {
-            // Do nothing if `PackageManager` says Privacy Browser isn't installed.
-        }
-
-        // Scroll the tab if the saved instance state is not null.
-        if (savedInstanceState != null) {
-            aboutVersionLayout.post(() -> {
-                aboutVersionLayout.setScrollX(savedInstanceState.getInt("scroll_x"));
-                aboutVersionLayout.setScrollY(savedInstanceState.getInt("scroll_y"));
-            });
-        }
-
-        // Return the tab layout.
-        return aboutVersionLayout;
-    }
-
-    @Override
-    public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater menuInflater) {
-        // Inflate the about version menu.
-        menuInflater.inflate(R.menu.about_version_options_menu, menu);
-
-        // Run the default commands.
-        super.onCreateOptionsMenu(menu, menuInflater);
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(@NonNull MenuItem menuItem) {
-        // Remove the incorrect lint warning below that the activity might be null.
-        assert getActivity() != null;
-
-        // Get the ID of the menu item that was selected.
-        int menuItemId = menuItem.getItemId();
-
-        // Run the appropriate commands.
-        if (menuItemId == R.id.copy) {  // Copy.
-            // Get the about version string.
-            String aboutVersionString = getAboutVersionString();
-
-            // Get a handle for the clipboard manager.
-            ClipboardManager clipboardManager = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
-
-            // Remove the incorrect lint error below that the clipboard manager might be null.
-            assert clipboardManager != null;
-
-            // Save the about version string in a clip data.
-            ClipData aboutVersionClipData = ClipData.newPlainText(getString(R.string.about), aboutVersionString);
-
-            // Place the clip data on the clipboard.
-            clipboardManager.setPrimaryClip(aboutVersionClipData);
-
-            // Display a snackbar.
-            Snackbar.make(aboutVersionLayout, R.string.version_info_copied, Snackbar.LENGTH_SHORT).show();
-
-            // Consume the event.
-            return true;
-        } else if (menuItemId == R.id.share) {  // Share.
-            // Get the about version string.
-            String aboutString = getAboutVersionString();
-
-            // Create an email intent.
-            Intent emailIntent = new Intent(Intent.ACTION_SEND);
-
-            // Add the about version string to the intent.
-            emailIntent.putExtra(Intent.EXTRA_TEXT, aboutString);
-
-            // Set the MIME type.
-            emailIntent.setType("text/plain");
-
-            // Set the intent to open in a new task.
-            emailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-
-            // Make it so.
-            startActivity(Intent.createChooser(emailIntent, getString(R.string.share)));
-
-            // Consume the event.
-            return true;
-        } else if (menuItemId == R.id.save_text) {  // Save text.
-            // Instantiate the save alert dialog.
-            DialogFragment saveTextDialogFragment = SaveDialog.save(SaveDialog.SAVE_ABOUT_VERSION_TEXT);
-
-            // Show the save alert dialog.
-            saveTextDialogFragment.show(getActivity().getSupportFragmentManager(), getString(R.string.save_dialog));
-
-            // Consume the event.
-            return true;
-        } else if (menuItemId == R.id.save_image) {  // Save image.
-            // Instantiate the save alert dialog.
-            DialogFragment saveImageDialogFragment = SaveDialog.save(SaveDialog.SAVE_ABOUT_VERSION_IMAGE);
-
-            // Show the save alert dialog.
-            saveImageDialogFragment.show(getActivity().getSupportFragmentManager(), getString(R.string.save_dialog));
-
-            // Consume the event.
-            return true;
-        } else {  // The home button was selected.
-            // Return the parent class.
-            return super.onOptionsItemSelected(menuItem);
-        }
-    }
-
-    @Override
-    public void onSaveInstanceState(@NonNull Bundle savedInstanceState) {
-        // Run the default commands.
-        super.onSaveInstanceState(savedInstanceState);
-
-        // Save the scroll positions if the layout is not null, which can happen if a tab is not currently selected.
-        if (aboutVersionLayout != null) {
-            savedInstanceState.putInt("scroll_x", aboutVersionLayout.getScrollX());
-            savedInstanceState.putInt("scroll_y", aboutVersionLayout.getScrollY());
-        }
-    }
-
-    @Override
-    public void onPause() {
-        // Run the default commands.
-        super.onPause();
-
-        // Pause the updating of the memory usage.
-        updateMemoryUsageBoolean = false;
-    }
-
-    @Override
-    public void onResume() {
-        // Run the default commands.
-        super.onResume();
-
-        // Resume the updating of the memory usage.
-        updateMemoryUsageBoolean = true;
-    }
-
-    public void updateMemoryUsage(Activity activity) {
-        try {
-            // Update the memory usage if enabled.
-            if (updateMemoryUsageBoolean) {
-                // Populate the memory info variable.
-                activityManager.getMemoryInfo(memoryInfo);
-
-                // Get the app memory information.
-                long appAvailableMemoryLong = runtime.freeMemory();
-                long appTotalMemoryLong = runtime.totalMemory();
-                long appMaximumMemoryLong = runtime.maxMemory();
-
-                // Calculate the app consumed memory.
-                long appConsumedMemoryLong = appTotalMemoryLong - appAvailableMemoryLong;
-
-                // Get the system memory information.
-                long systemTotalMemoryLong = memoryInfo.totalMem;
-                long systemAvailableMemoryLong = memoryInfo.availMem;
-
-                // Calculate the system consumed memory.
-                long systemConsumedMemoryLong = systemTotalMemoryLong - systemAvailableMemoryLong;
-
-                // Convert the memory information into mebibytes.
-                float appConsumedMemoryFloat = (float) appConsumedMemoryLong / MEBIBYTE;
-                float appAvailableMemoryFloat = (float) appAvailableMemoryLong / MEBIBYTE;
-                float appTotalMemoryFloat = (float) appTotalMemoryLong / MEBIBYTE;
-                float appMaximumMemoryFloat = (float) appMaximumMemoryLong / MEBIBYTE;
-                float systemConsumedMemoryFloat = (float) systemConsumedMemoryLong / MEBIBYTE;
-                float systemAvailableMemoryFloat = (float) systemAvailableMemoryLong / MEBIBYTE;
-                float systemTotalMemoryFloat = (float) systemTotalMemoryLong / MEBIBYTE;
-
-                // Get the mebibyte string.
-                String mebibyte = getString(R.string.mebibyte);
-
-                // Calculate the mebibyte length.
-                int mebibyteLength = mebibyte.length();
-
-                // Create spannable string builders.
-                SpannableStringBuilder appConsumedMemoryStringBuilder = new SpannableStringBuilder(appConsumedMemoryLabel + numberFormat.format(appConsumedMemoryFloat) + " " + mebibyte);
-                SpannableStringBuilder appAvailableMemoryStringBuilder = new SpannableStringBuilder(appAvailableMemoryLabel + numberFormat.format(appAvailableMemoryFloat) + " " + mebibyte);
-                SpannableStringBuilder appTotalMemoryStringBuilder = new SpannableStringBuilder(appTotalMemoryLabel + numberFormat.format(appTotalMemoryFloat) + " " + mebibyte);
-                SpannableStringBuilder appMaximumMemoryStringBuilder = new SpannableStringBuilder(appMaximumMemoryLabel + numberFormat.format(appMaximumMemoryFloat) + " " + mebibyte);
-                SpannableStringBuilder systemConsumedMemoryStringBuilder = new SpannableStringBuilder(systemConsumedMemoryLabel + numberFormat.format(systemConsumedMemoryFloat) + " " + mebibyte);
-                SpannableStringBuilder systemAvailableMemoryStringBuilder = new SpannableStringBuilder(systemAvailableMemoryLabel + numberFormat.format(systemAvailableMemoryFloat) + " " + mebibyte);
-                SpannableStringBuilder systemTotalMemoryStringBuilder = new SpannableStringBuilder(systemTotalMemoryLabel + numberFormat.format(systemTotalMemoryFloat) + " " + mebibyte);
-
-                // Setup the spans to display the memory information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
-                appConsumedMemoryStringBuilder.setSpan(blueColorSpan, appConsumedMemoryLabel.length(), appConsumedMemoryStringBuilder.length() - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                appAvailableMemoryStringBuilder.setSpan(blueColorSpan, appAvailableMemoryLabel.length(), appAvailableMemoryStringBuilder.length() - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                appTotalMemoryStringBuilder.setSpan(blueColorSpan, appTotalMemoryLabel.length(), appTotalMemoryStringBuilder.length() - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                appMaximumMemoryStringBuilder.setSpan(blueColorSpan, appMaximumMemoryLabel.length(), appMaximumMemoryStringBuilder.length() - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                systemConsumedMemoryStringBuilder.setSpan(blueColorSpan, systemConsumedMemoryLabel.length(), systemConsumedMemoryStringBuilder.length() - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                systemAvailableMemoryStringBuilder.setSpan(blueColorSpan, systemAvailableMemoryLabel.length(), systemAvailableMemoryStringBuilder.length() - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-                systemTotalMemoryStringBuilder.setSpan(blueColorSpan, systemTotalMemoryLabel.length(), systemTotalMemoryStringBuilder.length() - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-
-                // Display the string in the text boxes.
-                appConsumedMemoryTextView.setText(appConsumedMemoryStringBuilder);
-                appAvailableMemoryTextView.setText(appAvailableMemoryStringBuilder);
-                appTotalMemoryTextView.setText(appTotalMemoryStringBuilder);
-                appMaximumMemoryTextView.setText(appMaximumMemoryStringBuilder);
-                systemConsumedMemoryTextView.setText(systemConsumedMemoryStringBuilder);
-                systemAvailableMemoryTextView.setText(systemAvailableMemoryStringBuilder);
-                systemTotalMemoryTextView.setText(systemTotalMemoryStringBuilder);
-            }
-
-            // Schedule another memory update if the activity has not been destroyed.
-            if (!activity.isDestroyed()) {
-                // Create a handler to update the memory usage.
-                Handler updateMemoryUsageHandler = new Handler();
-
-                // Create a runnable to update the memory usage.
-                Runnable updateMemoryUsageRunnable = () -> updateMemoryUsage(activity);
-
-                // Update the memory usage after 1000 milliseconds
-                updateMemoryUsageHandler.postDelayed(updateMemoryUsageRunnable, 1000);
-            }
-        } catch (Exception exception) {
-            // Do nothing.
-        }
-    }
-
-    public String getAboutVersionString() {
-        // Initialize an about version string builder.
-        StringBuilder aboutVersionStringBuilder = new StringBuilder();
-
-        // Populate the about version string builder.
-        aboutVersionStringBuilder.append(privacyBrowserTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(versionTextView.getText());
-        aboutVersionStringBuilder.append("\n\n");
-        aboutVersionStringBuilder.append(hardwareTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(brandTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(manufacturerTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(modelTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(deviceTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(bootloaderTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        if (radioTextView.getVisibility() == View.VISIBLE) {
-            aboutVersionStringBuilder.append(radioTextView.getText());
-            aboutVersionStringBuilder.append("\n");
-        }
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(softwareTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(androidTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        if (securityPatchTextView.getVisibility() == View.VISIBLE) {
-            aboutVersionStringBuilder.append(securityPatchTextView.getText());
-            aboutVersionStringBuilder.append("\n");
-        }
-        aboutVersionStringBuilder.append(buildTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        if (webViewProviderTextView.getVisibility() == View.VISIBLE) {
-            aboutVersionStringBuilder.append(webViewProviderTextView.getText());
-            aboutVersionStringBuilder.append("\n");
-        }
-        aboutVersionStringBuilder.append(webViewVersionTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        if (orbotTextView.getVisibility() == View.VISIBLE) {
-            aboutVersionStringBuilder.append(orbotTextView.getText());
-            aboutVersionStringBuilder.append("\n");
-        }
-        if (i2pTextView.getVisibility() == View.VISIBLE) {
-            aboutVersionStringBuilder.append(i2pTextView.getText());
-            aboutVersionStringBuilder.append("\n");
-        }
-        if (openKeychainTextView.getVisibility() == View.VISIBLE) {
-            aboutVersionStringBuilder.append(openKeychainTextView.getText());
-            aboutVersionStringBuilder.append("\n");
-        }
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(memoryUsageTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(appConsumedMemoryTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(appAvailableMemoryTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(appTotalMemoryTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(appMaximumMemoryTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(systemConsumedMemoryTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(systemAvailableMemoryTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(systemTotalMemoryTextView.getText());
-        aboutVersionStringBuilder.append("\n\n");
-        aboutVersionStringBuilder.append(blocklistsTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(easyListTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(easyPrivacyTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(fanboyAnnoyanceTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(fanboySocialTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(ultraListTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(ultraPrivacyTextView.getText());
-        aboutVersionStringBuilder.append("\n\n");
-        aboutVersionStringBuilder.append(packageSignatureTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(certificateIssuerDnTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(certificateSubjectDnTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(certificateStartDateTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(certificateEndDateTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(certificateVersionTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(certificateSerialNumberTextView.getText());
-        aboutVersionStringBuilder.append("\n");
-        aboutVersionStringBuilder.append(certificateSignatureAlgorithmTextView.getText());
-
-        // Return the string.
-        return aboutVersionStringBuilder.toString();
-    }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt b/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt
new file mode 100644 (file)
index 0000000..4a9869c
--- /dev/null
@@ -0,0 +1,890 @@
+/*
+ * Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+ *
+ * Privacy Browser is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.stoutner.privacybrowser.fragments
+
+import android.annotation.SuppressLint
+import android.app.Activity
+import android.app.ActivityManager
+import android.content.ClipData
+import android.content.ClipboardManager
+import android.content.Context
+import android.content.Intent
+import android.content.pm.PackageManager
+import android.net.Uri
+import android.os.Build
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.provider.OpenableColumns
+import android.text.SpannableStringBuilder
+import android.text.Spanned
+import android.text.style.ForegroundColorSpan
+import android.view.LayoutInflater
+import android.view.Menu
+import android.view.MenuInflater
+import android.view.MenuItem
+import android.view.View
+import android.view.ViewGroup
+import android.webkit.WebView
+import android.widget.TextView
+
+import androidx.activity.result.contract.ActivityResultContracts
+import androidx.fragment.app.Fragment
+import androidx.webkit.WebViewCompat
+
+import com.google.android.material.snackbar.Snackbar
+
+import com.stoutner.privacybrowser.R
+import com.stoutner.privacybrowser.BuildConfig
+import com.stoutner.privacybrowser.asynctasks.SaveAboutVersionImage
+
+import java.io.ByteArrayInputStream
+import java.io.InputStream
+import java.lang.Exception
+import java.nio.charset.StandardCharsets
+import java.security.cert.CertificateException
+import java.security.cert.CertificateFactory
+import java.security.cert.X509Certificate
+import java.text.DateFormat
+import java.text.NumberFormat
+
+import kotlin.text.StringBuilder
+
+// Define the class constants.
+private const val BLOCKLIST_VERSIONS = "blocklist_versions"
+private const val MEBIBYTE = 1048576
+
+class AboutVersionFragment : Fragment() {
+    // Define the class variables.
+    private var updateMemoryUsageBoolean = true
+
+    // Declare the class variables.
+    private lateinit var blocklistVersions: Array<String>
+    private lateinit var aboutVersionLayout: View
+    private lateinit var appConsumedMemoryLabel: String
+    private lateinit var appAvailableMemoryLabel: String
+    private lateinit var appTotalMemoryLabel: String
+    private lateinit var appMaximumMemoryLabel: String
+    private lateinit var systemConsumedMemoryLabel: String
+    private lateinit var systemAvailableMemoryLabel: String
+    private lateinit var systemTotalMemoryLabel: String
+    private lateinit var runtime: Runtime
+    private lateinit var activityManager: ActivityManager
+    private lateinit var memoryInfo: ActivityManager.MemoryInfo
+    private lateinit var numberFormat: NumberFormat
+    private lateinit var blueColorSpan: ForegroundColorSpan
+
+    // Declare the class views.
+    private lateinit var privacyBrowserTextView: TextView
+    private lateinit var versionTextView: TextView
+    private lateinit var hardwareTextView: TextView
+    private lateinit var brandTextView: TextView
+    private lateinit var manufacturerTextView: TextView
+    private lateinit var modelTextView: TextView
+    private lateinit var deviceTextView: TextView
+    private lateinit var bootloaderTextView: TextView
+    private lateinit var radioTextView: TextView
+    private lateinit var softwareTextView: TextView
+    private lateinit var androidTextView: TextView
+    private lateinit var securityPatchTextView: TextView
+    private lateinit var buildTextView: TextView
+    private lateinit var webViewProviderTextView: TextView
+    private lateinit var webViewVersionTextView: TextView
+    private lateinit var orbotTextView: TextView
+    private lateinit var i2pTextView: TextView
+    private lateinit var openKeychainTextView: TextView
+    private lateinit var memoryUsageTextView: TextView
+    private lateinit var appConsumedMemoryTextView: TextView
+    private lateinit var appAvailableMemoryTextView: TextView
+    private lateinit var appTotalMemoryTextView: TextView
+    private lateinit var appMaximumMemoryTextView: TextView
+    private lateinit var systemConsumedMemoryTextView: TextView
+    private lateinit var systemAvailableMemoryTextView: TextView
+    private lateinit var systemTotalMemoryTextView: TextView
+    private lateinit var blocklistsTextView: TextView
+    private lateinit var easyListTextView: TextView
+    private lateinit var easyPrivacyTextView: TextView
+    private lateinit var fanboyAnnoyanceTextView: TextView
+    private lateinit var fanboySocialTextView: TextView
+    private lateinit var ultraListTextView: TextView
+    private lateinit var ultraPrivacyTextView: TextView
+    private lateinit var packageSignatureTextView: TextView
+    private lateinit var certificateIssuerDnTextView: TextView
+    private lateinit var certificateSubjectDnTextView: TextView
+    private lateinit var certificateStartDateTextView: TextView
+    private lateinit var certificateEndDateTextView: TextView
+    private lateinit var certificateVersionTextView: TextView
+    private lateinit var certificateSerialNumberTextView: TextView
+    private lateinit var certificateSignatureAlgorithmTextView: TextView
+
+    companion object {
+        fun createTab(blocklistVersions: Array<String>): AboutVersionFragment {
+            // Create an arguments bundle.
+            val argumentsBundle = Bundle()
+
+            // Store the arguments in the bundle.
+            argumentsBundle.putStringArray(BLOCKLIST_VERSIONS, blocklistVersions)
+
+            // Create a new instance of the tab fragment.
+            val aboutVersionFragment = AboutVersionFragment()
+
+            // Add the arguments bundle to the fragment.
+            aboutVersionFragment.arguments = argumentsBundle
+
+            // Return the new fragment.
+            return aboutVersionFragment
+        }
+    }
+
+    // Define the save about version text activity result launcher.  It must be defined before `onCreate()` is run or the app will crash.
+    private val saveAboutVersionTextActivityResultLauncher = registerForActivityResult(ActivityResultContracts.CreateDocument()) { fileNameUri: Uri? ->
+        // Only save the file if the URI is not null, which happens if the user exited the file picker by pressing back.
+        if (fileNameUri != null) {
+            try {
+                // Get the about version string.
+                val aboutVersionString = getAboutVersionString()
+
+                // Open an output stream.
+                val outputStream = requireActivity().contentResolver.openOutputStream(fileNameUri)!!
+
+                // Write the about version string to the output stream.
+                outputStream.write(aboutVersionString.toByteArray(StandardCharsets.UTF_8))
+
+                // Close the output stream.
+                outputStream.close()
+
+                // Initialize the file name string from the file name URI last path segment.
+                var fileNameString = fileNameUri.lastPathSegment
+
+                // Query the exact file name if the API >= 26.
+                if (Build.VERSION.SDK_INT >= 26) {
+                    // Get a cursor from the content resolver.
+                    val contentResolverCursor = requireActivity().contentResolver.query(fileNameUri, null, null, null)!!
+
+                    // Move to the first row.
+                    contentResolverCursor.moveToFirst()
+
+                    // Get the file name from the cursor.
+                    fileNameString = contentResolverCursor.getString(contentResolverCursor.getColumnIndex(OpenableColumns.DISPLAY_NAME))
+
+                    // Close the cursor.
+                    contentResolverCursor.close()
+                }
+
+                // Display a snackbar with the saved logcat information.
+                Snackbar.make(aboutVersionLayout, getString(R.string.saved, fileNameString), Snackbar.LENGTH_SHORT).show()
+            } catch (exception: Exception) {
+                // Display a snackbar with the error message.
+                Snackbar.make(aboutVersionLayout, getString(R.string.error_saving_file) + "  " + exception.toString(), Snackbar.LENGTH_INDEFINITE).show()
+            }
+        }
+    }
+
+    // Define the save about version image activity result launcher.  It must be defined before `onCreate()` is run or the app will crash.
+    private val saveAboutVersionImageActivityResultLauncher = registerForActivityResult(ActivityResultContracts.CreateDocument()) { fileNameUri: Uri? ->
+        // Only save the file if the URI is not null, which happens if the user exited the file picker by pressing back.
+        if (fileNameUri != null) {
+            // Save the about version image.
+            SaveAboutVersionImage(requireActivity(), fileNameUri, aboutVersionLayout.findViewById(R.id.about_version_linearlayout)).execute()
+        }
+    }
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        // Run the default commands.
+        super.onCreate(savedInstanceState)
+
+        // Store the arguments in class variables.
+        blocklistVersions = requireArguments().getStringArray(BLOCKLIST_VERSIONS)!!
+
+        // Enable the options menu for this fragment.
+        setHasOptionsMenu(true)
+    }
+
+    override fun onCreateView(layoutInflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
+        // Inflate the layout.  Setting false at the end of inflater.inflate does not attach the inflated layout as a child of container.  The fragment will take care of attaching the root automatically.
+        aboutVersionLayout = layoutInflater.inflate(R.layout.about_version_scrollview, container, false)
+
+        // Get handles for the views.
+        privacyBrowserTextView = aboutVersionLayout.findViewById(R.id.privacy_browser_textview)
+        versionTextView = aboutVersionLayout.findViewById(R.id.version)
+        hardwareTextView = aboutVersionLayout.findViewById(R.id.hardware)
+        brandTextView = aboutVersionLayout.findViewById(R.id.brand)
+        manufacturerTextView = aboutVersionLayout.findViewById(R.id.manufacturer)
+        modelTextView = aboutVersionLayout.findViewById(R.id.model)
+        deviceTextView = aboutVersionLayout.findViewById(R.id.device)
+        bootloaderTextView = aboutVersionLayout.findViewById(R.id.bootloader)
+        radioTextView = aboutVersionLayout.findViewById(R.id.radio)
+        softwareTextView = aboutVersionLayout.findViewById(R.id.software)
+        androidTextView = aboutVersionLayout.findViewById(R.id.android)
+        securityPatchTextView = aboutVersionLayout.findViewById(R.id.security_patch)
+        buildTextView = aboutVersionLayout.findViewById(R.id.build)
+        webViewProviderTextView = aboutVersionLayout.findViewById(R.id.webview_provider)
+        webViewVersionTextView = aboutVersionLayout.findViewById(R.id.webview_version)
+        orbotTextView = aboutVersionLayout.findViewById(R.id.orbot)
+        i2pTextView = aboutVersionLayout.findViewById(R.id.i2p)
+        openKeychainTextView = aboutVersionLayout.findViewById(R.id.open_keychain)
+        memoryUsageTextView = aboutVersionLayout.findViewById(R.id.memory_usage)
+        appConsumedMemoryTextView = aboutVersionLayout.findViewById(R.id.app_consumed_memory)
+        appAvailableMemoryTextView = aboutVersionLayout.findViewById(R.id.app_available_memory)
+        appTotalMemoryTextView = aboutVersionLayout.findViewById(R.id.app_total_memory)
+        appMaximumMemoryTextView = aboutVersionLayout.findViewById(R.id.app_maximum_memory)
+        systemConsumedMemoryTextView = aboutVersionLayout.findViewById(R.id.system_consumed_memory)
+        systemAvailableMemoryTextView = aboutVersionLayout.findViewById(R.id.system_available_memory)
+        systemTotalMemoryTextView = aboutVersionLayout.findViewById(R.id.system_total_memory)
+        blocklistsTextView = aboutVersionLayout.findViewById(R.id.blocklists)
+        easyListTextView = aboutVersionLayout.findViewById(R.id.easylist)
+        easyPrivacyTextView = aboutVersionLayout.findViewById(R.id.easyprivacy)
+        fanboyAnnoyanceTextView = aboutVersionLayout.findViewById(R.id.fanboy_annoyance)
+        fanboySocialTextView = aboutVersionLayout.findViewById(R.id.fanboy_social)
+        ultraListTextView = aboutVersionLayout.findViewById(R.id.ultralist)
+        ultraPrivacyTextView = aboutVersionLayout.findViewById(R.id.ultraprivacy)
+        packageSignatureTextView = aboutVersionLayout.findViewById(R.id.package_signature)
+        certificateIssuerDnTextView = aboutVersionLayout.findViewById(R.id.certificate_issuer_dn)
+        certificateSubjectDnTextView = aboutVersionLayout.findViewById(R.id.certificate_subject_dn)
+        certificateStartDateTextView = aboutVersionLayout.findViewById(R.id.certificate_start_date)
+        certificateEndDateTextView = aboutVersionLayout.findViewById(R.id.certificate_end_date)
+        certificateVersionTextView = aboutVersionLayout.findViewById(R.id.certificate_version)
+        certificateSerialNumberTextView = aboutVersionLayout.findViewById(R.id.certificate_serial_number)
+        certificateSignatureAlgorithmTextView = aboutVersionLayout.findViewById(R.id.certificate_signature_algorithm)
+
+        // Setup the labels.
+        val version = getString(R.string.version) + " " + BuildConfig.VERSION_NAME + " (" + getString(R.string.version_code) + " " + BuildConfig.VERSION_CODE + ")"
+        val brandLabel = getString(R.string.brand) + "  "
+        val manufacturerLabel = getString(R.string.manufacturer) + "  "
+        val modelLabel = getString(R.string.model) + "  "
+        val deviceLabel = getString(R.string.device) + "  "
+        val bootloaderLabel = getString(R.string.bootloader) + "  "
+        val androidLabel = getString(R.string.android) + "  "
+        val buildLabel = getString(R.string.build) + "  "
+        val webViewVersionLabel = getString(R.string.webview_version) + "  "
+        appConsumedMemoryLabel = getString(R.string.app_consumed_memory) + "  "
+        appAvailableMemoryLabel = getString(R.string.app_available_memory) + "  "
+        appTotalMemoryLabel = getString(R.string.app_total_memory) + "  "
+        appMaximumMemoryLabel = getString(R.string.app_maximum_memory) + "  "
+        systemConsumedMemoryLabel = getString(R.string.system_consumed_memory) + "  "
+        systemAvailableMemoryLabel = getString(R.string.system_available_memory) + "  "
+        systemTotalMemoryLabel = getString(R.string.system_total_memory) + "  "
+        val easyListLabel = getString(R.string.easylist_label) + "  "
+        val easyPrivacyLabel = getString(R.string.easyprivacy_label) + "  "
+        val fanboyAnnoyanceLabel = getString(R.string.fanboy_annoyance_label) + "  "
+        val fanboySocialLabel = getString(R.string.fanboy_social_label) + "  "
+        val ultraListLabel = getString(R.string.ultralist_label) + "  "
+        val ultraPrivacyLabel = getString(R.string.ultraprivacy_label) + "  "
+        val issuerDNLabel = getString(R.string.issuer_dn) + "  "
+        val subjectDNLabel = getString(R.string.subject_dn) + "  "
+        val startDateLabel = getString(R.string.start_date) + "  "
+        val endDateLabel = getString(R.string.end_date) + "  "
+        val certificateVersionLabel = getString(R.string.certificate_version) + "  "
+        val serialNumberLabel = getString(R.string.serial_number) + "  "
+        val signatureAlgorithmLabel = getString(R.string.signature_algorithm) + "  "
+
+        // The WebView layout is only used to get the default user agent from `bare_webview`.  It is not used to render content on the screen.
+        // Once the minimum API >= 26 this can be accomplished with the WebView package info.
+        val webViewLayout = layoutInflater.inflate(R.layout.bare_webview, container, false)
+        val tabLayoutWebView = webViewLayout.findViewById<WebView>(R.id.bare_webview)
+        val userAgentString = tabLayoutWebView.settings.userAgentString
+
+        // Get the device's information and store it in strings.
+        val brand = Build.BRAND
+        val manufacturer = Build.MANUFACTURER
+        val model = Build.MODEL
+        val device = Build.DEVICE
+        val bootloader = Build.BOOTLOADER
+        val radio = Build.getRadioVersion()
+        val android = Build.VERSION.RELEASE + " (" + getString(R.string.api) + " " + Build.VERSION.SDK_INT + ")"
+        val build = Build.DISPLAY
+        // Select the substring that begins after `Chrome/` and goes until the next ` `.
+        val webView = userAgentString.substring(userAgentString.indexOf("Chrome/") + 7, userAgentString.indexOf(" ", userAgentString.indexOf("Chrome/")))
+
+        // Get the Orbot version name if Orbot is installed.
+        val orbot: String = try {
+            // Store the version name.
+            requireContext().packageManager.getPackageInfo("org.torproject.android", 0).versionName
+        } catch (exception: PackageManager.NameNotFoundException) {  // Orbot is not installed.
+            // Store an empty string.
+            ""
+        }
+
+        // Get the I2P version name if I2P is installed.
+        val i2p: String = try {
+            // Store the version name.
+            requireContext().packageManager.getPackageInfo("net.i2p.android.router", 0).versionName
+        } catch (exception: PackageManager.NameNotFoundException) {  // I2P is not installed.
+            // Store an empty string.
+            ""
+        }
+
+        // Get the OpenKeychain version name if it is installed.
+        val openKeychain: String = try {
+            // Store the version name.
+            requireContext().packageManager.getPackageInfo("org.sufficientlysecure.keychain", 0).versionName
+        } catch (exception: PackageManager.NameNotFoundException) {  // OpenKeychain is not installed.
+            // Store an empty string.
+            ""
+        }
+
+        // Create a spannable string builder for the hardware and software text views that need multiple colors of text.
+        val brandStringBuilder = SpannableStringBuilder(brandLabel + brand)
+        val manufacturerStringBuilder = SpannableStringBuilder(manufacturerLabel + manufacturer)
+        val modelStringBuilder = SpannableStringBuilder(modelLabel + model)
+        val deviceStringBuilder = SpannableStringBuilder(deviceLabel + device)
+        val bootloaderStringBuilder = SpannableStringBuilder(bootloaderLabel + bootloader)
+        val androidStringBuilder = SpannableStringBuilder(androidLabel + android)
+        val buildStringBuilder = SpannableStringBuilder(buildLabel + build)
+        val webViewVersionStringBuilder = SpannableStringBuilder(webViewVersionLabel + webView)
+        val easyListStringBuilder = SpannableStringBuilder(easyListLabel + blocklistVersions[0])
+        val easyPrivacyStringBuilder = SpannableStringBuilder(easyPrivacyLabel + blocklistVersions[1])
+        val fanboyAnnoyanceStringBuilder = SpannableStringBuilder(fanboyAnnoyanceLabel + blocklistVersions[2])
+        val fanboySocialStringBuilder = SpannableStringBuilder(fanboySocialLabel + blocklistVersions[3])
+        val ultraListStringBuilder = SpannableStringBuilder(ultraListLabel + blocklistVersions[4])
+        val ultraPrivacyStringBuilder = SpannableStringBuilder(ultraPrivacyLabel + blocklistVersions[5])
+
+        // Set the blue color span according to the theme.  The deprecated `getColor()` must be used until the minimum API >= 23.
+        blueColorSpan = ForegroundColorSpan(resources.getColor(R.color.about_version_blue_text))
+
+        // Set the spans to display the device information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
+        brandStringBuilder.setSpan(blueColorSpan, brandLabel.length, brandStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        manufacturerStringBuilder.setSpan(blueColorSpan, manufacturerLabel.length, manufacturerStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        modelStringBuilder.setSpan(blueColorSpan, modelLabel.length, modelStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        deviceStringBuilder.setSpan(blueColorSpan, deviceLabel.length, deviceStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        bootloaderStringBuilder.setSpan(blueColorSpan, bootloaderLabel.length, bootloaderStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        androidStringBuilder.setSpan(blueColorSpan, androidLabel.length, androidStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        buildStringBuilder.setSpan(blueColorSpan, buildLabel.length, buildStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        webViewVersionStringBuilder.setSpan(blueColorSpan, webViewVersionLabel.length, webViewVersionStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        easyListStringBuilder.setSpan(blueColorSpan, easyListLabel.length, easyListStringBuilder.length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
+        easyPrivacyStringBuilder.setSpan(blueColorSpan, easyPrivacyLabel.length, easyPrivacyStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        fanboyAnnoyanceStringBuilder.setSpan(blueColorSpan, fanboyAnnoyanceLabel.length, fanboyAnnoyanceStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        fanboySocialStringBuilder.setSpan(blueColorSpan, fanboySocialLabel.length, fanboySocialStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        ultraListStringBuilder.setSpan(blueColorSpan, ultraListLabel.length, ultraListStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+        ultraPrivacyStringBuilder.setSpan(blueColorSpan, ultraPrivacyLabel.length, ultraPrivacyStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+
+        // Display the strings in the text boxes.
+        versionTextView.text = version
+        brandTextView.text = brandStringBuilder
+        manufacturerTextView.text = manufacturerStringBuilder
+        modelTextView.text = modelStringBuilder
+        deviceTextView.text = deviceStringBuilder
+        bootloaderTextView.text = bootloaderStringBuilder
+        androidTextView.text = androidStringBuilder
+        buildTextView.text = buildStringBuilder
+        webViewVersionTextView.text = webViewVersionStringBuilder
+        easyListTextView.text = easyListStringBuilder
+        easyPrivacyTextView.text = easyPrivacyStringBuilder
+        fanboyAnnoyanceTextView.text = fanboyAnnoyanceStringBuilder
+        fanboySocialTextView.text = fanboySocialStringBuilder
+        ultraListTextView.text = ultraListStringBuilder
+        ultraPrivacyTextView.text = ultraPrivacyStringBuilder
+
+        // Only populate the radio text view if there is a radio in the device.
+        // Null must be checked because some Samsung tablets report a null value for the radio instead of an empty string.  Grrrr.  <https://redmine.stoutner.com/issues/701>
+        if (radio != null && radio.isNotEmpty()) {
+            // Setup the label.
+            val radioLabel = getString(R.string.radio) + "  "
+
+            // Create a spannable string builder.
+            val radioStringBuilder = SpannableStringBuilder(radioLabel + radio)
+
+            // Set the span to display the radio in blue.
+            radioStringBuilder.setSpan(blueColorSpan, radioLabel.length, radioStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+
+            // Display the string in the text view.
+            radioTextView.text = radioStringBuilder
+        } else {  // This device does not have a radio.
+            // Hide the radio text view.
+            radioTextView.visibility = View.GONE
+        }
+
+        // Build.VERSION.SECURITY_PATCH is only available for SDK_INT >= 23.
+        if (Build.VERSION.SDK_INT >= 23) {
+            // Setup the label.
+            val securityPatchLabel = getString(R.string.security_patch) + "  "
+
+            // Get the security patch version.
+            val securityPatch = Build.VERSION.SECURITY_PATCH
+
+            // Create a spannable string builder.
+            val securityPatchStringBuilder = SpannableStringBuilder(securityPatchLabel + securityPatch)
+
+            // Set the span to display the security patch version in blue.
+            securityPatchStringBuilder.setSpan(blueColorSpan, securityPatchLabel.length, securityPatchStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+
+            // Display the string in the text view.
+            securityPatchTextView.text = securityPatchStringBuilder
+        } else {  // The API < 23.
+            // Hide the security patch text view.
+            securityPatchTextView.visibility = View.GONE
+        }
+
+        // Only populate the WebView provider if the SDK >= 21.
+        if (Build.VERSION.SDK_INT >= 21) {
+            // Create the WebView provider label.
+            val webViewProviderLabel = getString(R.string.webview_provider) + "  "
+
+            // Get the current WebView package info.
+            val webViewPackageInfo = WebViewCompat.getCurrentWebViewPackage(requireContext())!!
+
+            // Get the WebView provider name.
+            val webViewPackageName = webViewPackageInfo.packageName
+
+            // Create the spannable string builder.
+            val webViewProviderStringBuilder = SpannableStringBuilder(webViewProviderLabel + webViewPackageName)
+
+            // Apply the coloration.
+            webViewProviderStringBuilder.setSpan(blueColorSpan, webViewProviderLabel.length, webViewProviderStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+
+            // Display the WebView provider.
+            webViewProviderTextView.text = webViewProviderStringBuilder
+        } else {  // The API < 21.
+            // Hide the WebView provider text view.
+            webViewProviderTextView.visibility = View.GONE
+        }
+
+        // Only populate the Orbot text view if it is installed.
+        if (orbot.isNotEmpty()) {
+            // Setup the label.
+            val orbotLabel = getString(R.string.orbot) + "  "
+
+            // Create a spannable string builder.
+            val orbotStringBuilder = SpannableStringBuilder(orbotLabel + orbot)
+
+            // Set the span to display the Orbot version.
+            orbotStringBuilder.setSpan(blueColorSpan, orbotLabel.length, orbotStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+
+            // Display the string in the text view.
+            orbotTextView.text = orbotStringBuilder
+        } else {  // Orbot is not installed.
+            // Hide the Orbot text view.
+            orbotTextView.visibility = View.GONE
+        }
+
+        // Only populate the I2P text view if it is installed.
+        if (i2p.isNotEmpty()) {
+            // Setup the label.
+            val i2pLabel = getString(R.string.i2p) + "  "
+
+            // Create a spannable string builder.
+            val i2pStringBuilder = SpannableStringBuilder(i2pLabel + i2p)
+
+            // Set the span to display the I2P version.
+            i2pStringBuilder.setSpan(blueColorSpan, i2pLabel.length, i2pStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+
+            // Display the string in the text view.
+            i2pTextView.text = i2pStringBuilder
+        } else {  // I2P is not installed.
+            // Hide the I2P text view.
+            i2pTextView.visibility = View.GONE
+        }
+
+        // Only populate the OpenKeychain text view if it is installed.
+        if (openKeychain.isNotEmpty()) {
+            // Setup the label.
+            val openKeychainLabel = getString(R.string.openkeychain) + "  "
+
+            // Create a spannable string builder.
+            val openKeychainStringBuilder = SpannableStringBuilder(openKeychainLabel + openKeychain)
+
+            // Set the span to display the OpenKeychain version.
+            openKeychainStringBuilder.setSpan(blueColorSpan, openKeychainLabel.length, openKeychainStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+
+            // Display the string in the text view.
+            openKeychainTextView.text = openKeychainStringBuilder
+        } else {  //OpenKeychain is not installed.
+            // Hide the OpenKeychain text view.
+            openKeychainTextView.visibility = View.GONE
+        }
+
+        // Display the package signature.
+        try {
+            // Get the first package signature.  Suppress the lint warning about the need to be careful in implementing comparison of certificates for security purposes.
+            // Once the minimum API >= 28, `GET_SIGNING_CERTIFICATES` can be used instead.
+            @SuppressLint("PackageManagerGetSignatures") val packageSignature = requireContext().packageManager.getPackageInfo(requireContext().packageName,PackageManager.GET_SIGNATURES)
+                .signatures[0]
+
+            // Convert the signature to a byte array input stream.
+            val certificateByteArrayInputStream: InputStream = ByteArrayInputStream(packageSignature.toByteArray())
+
+            // Display the certificate information on the screen.
+            try {
+                // Instantiate a certificate factory.
+                val certificateFactory = CertificateFactory.getInstance("X509")
+
+                // Generate an X509 certificate.
+                val x509Certificate = certificateFactory.generateCertificate(certificateByteArrayInputStream) as X509Certificate
+
+                // Store the individual sections of the certificate.
+                val issuerDNPrincipal = x509Certificate.issuerDN
+                val subjectDNPrincipal = x509Certificate.subjectDN
+                val startDate = x509Certificate.notBefore
+                val endDate = x509Certificate.notAfter
+                val certificateVersion = x509Certificate.version
+                val serialNumberBigInteger = x509Certificate.serialNumber
+                val signatureAlgorithmNameString = x509Certificate.sigAlgName
+
+                // Create a spannable string builder for each text view that needs multiple colors of text.
+                val issuerDNStringBuilder = SpannableStringBuilder(issuerDNLabel + issuerDNPrincipal.toString())
+                val subjectDNStringBuilder = SpannableStringBuilder(subjectDNLabel + subjectDNPrincipal.toString())
+                val startDateStringBuilder = SpannableStringBuilder(startDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(startDate))
+                val endDataStringBuilder = SpannableStringBuilder(endDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(endDate))
+                val certificateVersionStringBuilder = SpannableStringBuilder(certificateVersionLabel + certificateVersion)
+                val serialNumberStringBuilder = SpannableStringBuilder(serialNumberLabel + serialNumberBigInteger)
+                val signatureAlgorithmStringBuilder = SpannableStringBuilder(signatureAlgorithmLabel + signatureAlgorithmNameString)
+
+                // Setup the spans to display the device information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
+                issuerDNStringBuilder.setSpan(blueColorSpan, issuerDNLabel.length, issuerDNStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                subjectDNStringBuilder.setSpan(blueColorSpan, subjectDNLabel.length, subjectDNStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                startDateStringBuilder.setSpan(blueColorSpan, startDateLabel.length, startDateStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                endDataStringBuilder.setSpan(blueColorSpan, endDateLabel.length, endDataStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                certificateVersionStringBuilder.setSpan(blueColorSpan, certificateVersionLabel.length, certificateVersionStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                serialNumberStringBuilder.setSpan(blueColorSpan, serialNumberLabel.length, serialNumberStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                signatureAlgorithmStringBuilder.setSpan(blueColorSpan, signatureAlgorithmLabel.length, signatureAlgorithmStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+
+                // Display the strings in the text boxes.
+                certificateIssuerDnTextView.text = issuerDNStringBuilder
+                certificateSubjectDnTextView.text = subjectDNStringBuilder
+                certificateStartDateTextView.text = startDateStringBuilder
+                certificateEndDateTextView.text = endDataStringBuilder
+                certificateVersionTextView.text = certificateVersionStringBuilder
+                certificateSerialNumberTextView.text = serialNumberStringBuilder
+                certificateSignatureAlgorithmTextView.text = signatureAlgorithmStringBuilder
+            } catch (certificateException: CertificateException) {
+                // Do nothing if there is a certificate error.
+            }
+
+            // Get a handle for the runtime.
+            runtime = Runtime.getRuntime()
+
+            // Get a handle for the activity manager.
+            activityManager = requireActivity().getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
+
+            // Instantiate a memory info variable.
+            memoryInfo = ActivityManager.MemoryInfo()
+
+            // Define a number format.
+            numberFormat = NumberFormat.getInstance()
+
+            // Set the minimum and maximum number of fraction digits.
+            numberFormat.minimumFractionDigits = 2
+            numberFormat.maximumFractionDigits = 2
+
+            // Update the memory usage.
+            updateMemoryUsage(requireActivity())
+        } catch (e: PackageManager.NameNotFoundException) {
+            // Do nothing if the package manager says Privacy Browser isn't installed.
+        }
+
+        // Scroll the tab if the saved instance state is not null.
+        if (savedInstanceState != null) {
+            aboutVersionLayout.post {
+                aboutVersionLayout.scrollX = savedInstanceState.getInt("scroll_x")
+                aboutVersionLayout.scrollY = savedInstanceState.getInt("scroll_y")
+            }
+        }
+
+        // Return the tab layout.
+        return aboutVersionLayout
+    }
+
+    override fun onCreateOptionsMenu(menu: Menu, menuInflater: MenuInflater) {
+        // Inflate the about version menu.
+        menuInflater.inflate(R.menu.about_version_options_menu, menu)
+
+        // Run the default commands.
+        super.onCreateOptionsMenu(menu, menuInflater)
+    }
+
+    override fun onOptionsItemSelected(menuItem: MenuItem): Boolean {
+        // Run the appropriate commands.
+        when (menuItem.itemId) {
+            R.id.copy -> {  // Copy.
+                // Get the about version string.
+                val aboutVersionString = getAboutVersionString()
+
+                // Get a handle for the clipboard manager.
+                val clipboardManager = (requireActivity().getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager)
+
+                // Save the about version string in a clip data.
+                val aboutVersionClipData = ClipData.newPlainText(getString(R.string.about), aboutVersionString)
+
+                // Place the clip data on the clipboard.
+                clipboardManager.setPrimaryClip(aboutVersionClipData)
+
+                // Display a snackbar.
+                Snackbar.make(aboutVersionLayout, R.string.version_info_copied, Snackbar.LENGTH_SHORT).show()
+
+                // Consume the event.
+                return true
+            }
+
+            R.id.share -> {  // Share.
+                // Get the about version string.
+                val aboutString = getAboutVersionString()
+
+                // Create an email intent.
+                val emailIntent = Intent(Intent.ACTION_SEND)
+
+                // Add the about version string to the intent.
+                emailIntent.putExtra(Intent.EXTRA_TEXT, aboutString)
+
+                // Set the MIME type.
+                emailIntent.type = "text/plain"
+
+                // Set the intent to open in a new task.
+                emailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+
+                // Make it so.
+                startActivity(Intent.createChooser(emailIntent, getString(R.string.share)))
+
+                // Consume the event.
+                return true
+            }
+
+            R.id.save_text -> {  // Save text.
+                // Open the file picker.
+                saveAboutVersionTextActivityResultLauncher.launch(getString(R.string.privacy_browser_version_txt, BuildConfig.VERSION_NAME))
+
+                // Consume the event.
+                return true
+            }
+
+            R.id.save_image -> {  // Save image.
+                // Open the file picker.
+                saveAboutVersionImageActivityResultLauncher.launch(getString(R.string.privacy_browser_version_png, BuildConfig.VERSION_NAME))
+
+                // Consume the event.
+                return true
+            }
+            else -> {  // The home button was selected.
+                // Run the parents class on return.
+                return super.onOptionsItemSelected(menuItem)
+            }
+        }
+    }
+
+    override fun onSaveInstanceState(savedInstanceState: Bundle) {
+        // Run the default commands.
+        super.onSaveInstanceState(savedInstanceState)
+
+        // Save the scroll positions.
+        savedInstanceState.putInt("scroll_x", aboutVersionLayout.scrollX)
+        savedInstanceState.putInt("scroll_y", aboutVersionLayout.scrollY)
+    }
+
+    override fun onPause() {
+        // Run the default commands.
+        super.onPause()
+
+        // Pause the updating of the memory usage.
+        updateMemoryUsageBoolean = false
+    }
+
+    override fun onResume() {
+        // Run the default commands.
+        super.onResume()
+
+        // Resume the updating of the memory usage.
+        updateMemoryUsageBoolean = true
+    }
+
+    fun updateMemoryUsage(activity: Activity) {
+        try {
+            // Update the memory usage if enabled.
+            if (updateMemoryUsageBoolean) {
+                // Populate the memory info variable.
+                activityManager.getMemoryInfo(memoryInfo)
+
+                // Get the app memory information.
+                val appAvailableMemoryLong = runtime.freeMemory()
+                val appTotalMemoryLong = runtime.totalMemory()
+                val appMaximumMemoryLong = runtime.maxMemory()
+
+                // Calculate the app consumed memory.
+                val appConsumedMemoryLong = appTotalMemoryLong - appAvailableMemoryLong
+
+                // Get the system memory information.
+                val systemTotalMemoryLong = memoryInfo.totalMem
+                val systemAvailableMemoryLong = memoryInfo.availMem
+
+                // Calculate the system consumed memory.
+                val systemConsumedMemoryLong = systemTotalMemoryLong - systemAvailableMemoryLong
+
+                // Convert the memory information into mebibytes.
+                val appConsumedMemoryFloat = appConsumedMemoryLong.toFloat() / MEBIBYTE
+                val appAvailableMemoryFloat = appAvailableMemoryLong.toFloat() / MEBIBYTE
+                val appTotalMemoryFloat = appTotalMemoryLong.toFloat() / MEBIBYTE
+                val appMaximumMemoryFloat = appMaximumMemoryLong.toFloat() / MEBIBYTE
+                val systemConsumedMemoryFloat = systemConsumedMemoryLong.toFloat() / MEBIBYTE
+                val systemAvailableMemoryFloat = systemAvailableMemoryLong.toFloat() / MEBIBYTE
+                val systemTotalMemoryFloat = systemTotalMemoryLong.toFloat() / MEBIBYTE
+
+                // Get the mebibyte string.
+                val mebibyte = getString(R.string.mebibyte)
+
+                // Calculate the mebibyte length.
+                val mebibyteLength = mebibyte.length
+
+                // Create spannable string builders.
+                val appConsumedMemoryStringBuilder = SpannableStringBuilder(appConsumedMemoryLabel + numberFormat.format(appConsumedMemoryFloat.toDouble()) + " " + mebibyte)
+                val appAvailableMemoryStringBuilder = SpannableStringBuilder(appAvailableMemoryLabel + numberFormat.format(appAvailableMemoryFloat.toDouble()) + " " + mebibyte)
+                val appTotalMemoryStringBuilder = SpannableStringBuilder(appTotalMemoryLabel + numberFormat.format(appTotalMemoryFloat.toDouble()) + " " + mebibyte)
+                val appMaximumMemoryStringBuilder = SpannableStringBuilder(appMaximumMemoryLabel + numberFormat.format(appMaximumMemoryFloat.toDouble()) + " " + mebibyte)
+                val systemConsumedMemoryStringBuilder = SpannableStringBuilder(systemConsumedMemoryLabel + numberFormat.format(systemConsumedMemoryFloat.toDouble()) + " " + mebibyte)
+                val systemAvailableMemoryStringBuilder = SpannableStringBuilder(systemAvailableMemoryLabel + numberFormat.format(systemAvailableMemoryFloat.toDouble()) + " " + mebibyte)
+                val systemTotalMemoryStringBuilder = SpannableStringBuilder(systemTotalMemoryLabel + numberFormat.format(systemTotalMemoryFloat.toDouble()) + " " + mebibyte)
+
+                // Setup the spans to display the memory information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
+                appConsumedMemoryStringBuilder.setSpan(blueColorSpan, appConsumedMemoryLabel.length, appConsumedMemoryStringBuilder.length - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                appAvailableMemoryStringBuilder.setSpan(blueColorSpan, appAvailableMemoryLabel.length, appAvailableMemoryStringBuilder.length - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                appTotalMemoryStringBuilder.setSpan(blueColorSpan, appTotalMemoryLabel.length, appTotalMemoryStringBuilder.length - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                appMaximumMemoryStringBuilder.setSpan(blueColorSpan, appMaximumMemoryLabel.length, appMaximumMemoryStringBuilder.length - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                systemConsumedMemoryStringBuilder.setSpan(blueColorSpan, systemConsumedMemoryLabel.length, systemConsumedMemoryStringBuilder.length - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                systemAvailableMemoryStringBuilder.setSpan(blueColorSpan, systemAvailableMemoryLabel.length, systemAvailableMemoryStringBuilder.length - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+                systemTotalMemoryStringBuilder.setSpan(blueColorSpan, systemTotalMemoryLabel.length, systemTotalMemoryStringBuilder.length - mebibyteLength, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
+
+                // Display the string in the text boxes.
+                appConsumedMemoryTextView.text = appConsumedMemoryStringBuilder
+                appAvailableMemoryTextView.text = appAvailableMemoryStringBuilder
+                appTotalMemoryTextView.text = appTotalMemoryStringBuilder
+                appMaximumMemoryTextView.text = appMaximumMemoryStringBuilder
+                systemConsumedMemoryTextView.text = systemConsumedMemoryStringBuilder
+                systemAvailableMemoryTextView.text = systemAvailableMemoryStringBuilder
+                systemTotalMemoryTextView.text = systemTotalMemoryStringBuilder
+            }
+
+            // Schedule another memory update if the activity has not been destroyed.
+            if (!activity.isDestroyed) {
+                // Create a handler to update the memory usage.
+                val updateMemoryUsageHandler = Handler(Looper.getMainLooper())
+
+                // Create a runnable to update the memory usage.
+                val updateMemoryUsageRunnable = Runnable { updateMemoryUsage(activity) }
+
+                // Update the memory usage after 1000 milliseconds
+                updateMemoryUsageHandler.postDelayed(updateMemoryUsageRunnable, 1000)
+            }
+        } catch (exception: Exception) {
+            // Do nothing.
+        }
+    }
+
+    fun getAboutVersionString(): String {
+        // Initialize an about version string builder.
+        val aboutVersionStringBuilder = StringBuilder()
+
+        // Populate the about version string builder.
+        aboutVersionStringBuilder.append(privacyBrowserTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(versionTextView.text)
+        aboutVersionStringBuilder.append("\n\n")
+        aboutVersionStringBuilder.append(hardwareTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(brandTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(manufacturerTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(modelTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(deviceTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(bootloaderTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        if (radioTextView.visibility == View.VISIBLE) {
+            aboutVersionStringBuilder.append(radioTextView.text)
+            aboutVersionStringBuilder.append("\n")
+        }
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(softwareTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(androidTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        if (securityPatchTextView.visibility == View.VISIBLE) {
+            aboutVersionStringBuilder.append(securityPatchTextView.text)
+            aboutVersionStringBuilder.append("\n")
+        }
+        aboutVersionStringBuilder.append(buildTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        if (webViewProviderTextView.visibility == View.VISIBLE) {
+            aboutVersionStringBuilder.append(webViewProviderTextView.text)
+            aboutVersionStringBuilder.append("\n")
+        }
+        aboutVersionStringBuilder.append(webViewVersionTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        if (orbotTextView.visibility == View.VISIBLE) {
+            aboutVersionStringBuilder.append(orbotTextView.text)
+            aboutVersionStringBuilder.append("\n")
+        }
+        if (i2pTextView.visibility == View.VISIBLE) {
+            aboutVersionStringBuilder.append(i2pTextView.text)
+            aboutVersionStringBuilder.append("\n")
+        }
+        if (openKeychainTextView.visibility == View.VISIBLE) {
+            aboutVersionStringBuilder.append(openKeychainTextView.text)
+            aboutVersionStringBuilder.append("\n")
+        }
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(memoryUsageTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(appConsumedMemoryTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(appAvailableMemoryTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(appTotalMemoryTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(appMaximumMemoryTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(systemConsumedMemoryTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(systemAvailableMemoryTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(systemTotalMemoryTextView.text)
+        aboutVersionStringBuilder.append("\n\n")
+        aboutVersionStringBuilder.append(blocklistsTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(easyListTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(easyPrivacyTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(fanboyAnnoyanceTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(fanboySocialTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(ultraListTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(ultraPrivacyTextView.text)
+        aboutVersionStringBuilder.append("\n\n")
+        aboutVersionStringBuilder.append(packageSignatureTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(certificateIssuerDnTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(certificateSubjectDnTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(certificateStartDateTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(certificateEndDateTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(certificateVersionTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(certificateSerialNumberTextView.text)
+        aboutVersionStringBuilder.append("\n")
+        aboutVersionStringBuilder.append(certificateSignatureAlgorithmTextView.text)
+
+        // Return the string.
+        return aboutVersionStringBuilder.toString()
+    }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/save_dialog_day.xml b/app/src/main/res/drawable/save_dialog_day.xml
deleted file mode 100644 (file)
index 4c50e9e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- This file comes from the Android Material icon set, where it is called `save`.  It is released under the Apache License 2.0. -->
-
-<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24"
-    android:viewportWidth="24"
-    android:autoMirrored="true"
-    tools:ignore="VectorRaster" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used. -->
-    <path
-        android:fillColor="#FF1565C0"
-        android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z" />
-</vector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/save_dialog_night.xml b/app/src/main/res/drawable/save_dialog_night.xml
deleted file mode 100644 (file)
index 1c79b35..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- This file comes from the Android Material icon set, where it is called `save`.  It is released under the Apache License 2.0. -->
-
-<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24"
-    android:viewportWidth="24"
-    android:autoMirrored="true"
-    tools:ignore="VectorRaster" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used. -->
-    <path
-        android:fillColor="#FF8AB4F8"
-        android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z" />
-</vector>
\ No newline at end of file
diff --git a/app/src/main/res/drawable/save_text_blue_day.xml b/app/src/main/res/drawable/save_text_blue_day.xml
deleted file mode 100644 (file)
index 69b71ea..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- This file comes from the Android Material icon set, where it is called `chrome_reader_mode`.  It is released under the Apache License 2.0. -->
-
-<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24"
-    android:viewportWidth="24"
-    android:autoMirrored="true"
-    tools:ignore="VectorRaster" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used instead. -->
-    <path
-        android:fillColor="#FF1565C0"
-        android:pathData="M13,12h7v1.5h-7zM13,9.5h7L20,11h-7zM13,14.5h7L20,16h-7zM21,4L3,4c-1.1,0 -2,0.9 -2,2v13c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,6c0,-1.1 -0.9,-2 -2,-2zM21,19h-9L12,6h9v13z"/>
-</vector>
diff --git a/app/src/main/res/drawable/save_text_blue_night.xml b/app/src/main/res/drawable/save_text_blue_night.xml
deleted file mode 100644 (file)
index 3dbcd7d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!-- This file comes from the Android Material icon set, where it is called `chrome_reader_mode`.  It is released under the Apache License 2.0. -->
-
-<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
-<vector
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:height="24dp"
-    android:width="24dp"
-    android:viewportHeight="24"
-    android:viewportWidth="24"
-    android:autoMirrored="true"
-    tools:ignore="VectorRaster" >
-
-    <!-- A hard coded color must be used until API >= 21.  Then `@color` or `?attr/colorControlNormal` may be used instead. -->
-    <path
-        android:fillColor="#FF8AB4F8"
-        android:pathData="M13,12h7v1.5h-7zM13,9.5h7L20,11h-7zM13,14.5h7L20,16h-7zM21,4L3,4c-1.1,0 -2,0.9 -2,2v13c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,6c0,-1.1 -0.9,-2 -2,-2zM21,19h-9L12,6h9v13z"/>
-</vector>
diff --git a/app/src/main/res/layout/about_version.xml b/app/src/main/res/layout/about_version.xml
deleted file mode 100644 (file)
index d9ee5ae..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright © 2016-2018,2020 Soren Stoutner <soren@stoutner.com>.
-
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
-  Privacy Browser is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  Privacy Browser is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- The scroll view allows the linear layout to scroll if it exceeds the height of the page. -->
-<ScrollView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_height="wrap_content"
-    android:layout_width="match_parent" >
-
-    <!-- The background needs to be specified here so that it appears if about version is saved as an image. -->
-    <LinearLayout
-        android:id="@+id/about_version_linearlayout"
-        android:layout_height="wrap_content"
-        android:layout_width="match_parent"
-        android:orientation="vertical"
-        android:padding="16dp"
-        android:background="?android:attr/colorBackground" >
-
-        <!-- The `RelativeLayout` contains the header. -->
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" >
-
-            <!--`tools:ignore="RtlSymmetry"` suppressed the lint warning about adding `android:paddingStart`, which wouldn't work with this layout.
-                `tools:ignore="ContentDescription"` suppresses the lint warning about supplying a content description for the image view,
-                which isn't needed in this case because the image view is only decorative. -->
-            <ImageView
-                android:id="@+id/icon"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:src="@mipmap/privacy_browser"
-                android:paddingTop="10dp"
-                android:paddingEnd="5dp"
-                tools:ignore="RtlSymmetry,ContentDescription" />
-
-            <TextView
-                android:id="@+id/privacy_browser_textview"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/privacy_browser"
-                android:textStyle="bold"
-                android:textSize="22sp"
-                android:textColor="?attr/blueTitleTextColor"
-                android:paddingTop="12dp"
-                android:layout_toEndOf="@id/icon" />
-
-            <TextView
-                android:id="@+id/version"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textColor="?attr/blueTextColor"
-                android:textIsSelectable="true"
-                android:layout_below="@id/privacy_browser_textview"
-                android:layout_toEndOf="@id/icon" />
-        </RelativeLayout>
-
-        <!-- The purpose of this linear layout is to provide padding on the start of the text views to make them line up with `about_version_icon`.
-             Although we don't need it, we have to include `android:paddingEnd` to make lint happy. -->
-        <LinearLayout
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:orientation="vertical"
-            android:paddingTop="16dp"
-            android:paddingStart="4dp"
-            android:paddingEnd="0dp" >
-
-            <!-- Hardware. -->
-            <TextView
-                android:id="@+id/hardware"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/hardware"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="?attr/blueTitleTextColor" />
-
-            <TextView
-                android:id="@+id/brand"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/manufacturer"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/model"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/device"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/bootloader"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/radio"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <!-- Software. -->
-            <TextView
-                android:id="@+id/software"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/software"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="?attr/blueTitleTextColor"
-                android:paddingTop="12dp" />
-
-            <TextView
-                android:id="@+id/android"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/security_patch"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/build"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/webview_provider"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/webview_version"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/orbot"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/i2p"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/open_keychain"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <!-- Memory usage. -->
-            <TextView
-                android:id="@+id/memory_usage"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/memory_usage"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="?attr/blueTitleTextColor"
-                android:paddingTop="12dp" />
-
-            <TextView
-                android:id="@+id/app_consumed_memory"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/app_available_memory"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/app_total_memory"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/app_maximum_memory"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/system_consumed_memory"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/system_available_memory"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/system_total_memory"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <!-- Blocklists. -->
-            <TextView
-                android:id="@+id/blocklists"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/blocklists"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="?attr/blueTitleTextColor"
-                android:paddingTop="12dp" />
-
-            <TextView
-                android:id="@+id/easylist"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/easyprivacy"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/fanboy_annoyance"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/fanboy_social"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/ultralist"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/ultraprivacy"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <!-- Package Signature. -->
-            <TextView
-                android:id="@+id/package_signature"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:text="@string/package_signature"
-                android:textStyle="bold"
-                android:textSize="18sp"
-                android:textColor="?attr/blueTitleTextColor"
-                android:paddingTop="12dp" />
-
-            <TextView
-                android:id="@+id/certificate_issuer_dn"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/certificate_subject_dn"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/certificate_start_date"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/certificate_end_date"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/certificate_version"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/certificate_serial_number"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-
-            <TextView
-                android:id="@+id/certificate_signature_algorithm"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textIsSelectable="true" />
-        </LinearLayout>
-    </LinearLayout>
-</ScrollView>
\ No newline at end of file
diff --git a/app/src/main/res/layout/about_version_scrollview.xml b/app/src/main/res/layout/about_version_scrollview.xml
new file mode 100644 (file)
index 0000000..d9ee5ae
--- /dev/null
@@ -0,0 +1,344 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2016-2018,2020 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+  Privacy Browser is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  Privacy Browser is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- The scroll view allows the linear layout to scroll if it exceeds the height of the page. -->
+<ScrollView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_height="wrap_content"
+    android:layout_width="match_parent" >
+
+    <!-- The background needs to be specified here so that it appears if about version is saved as an image. -->
+    <LinearLayout
+        android:id="@+id/about_version_linearlayout"
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        android:padding="16dp"
+        android:background="?android:attr/colorBackground" >
+
+        <!-- The `RelativeLayout` contains the header. -->
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" >
+
+            <!--`tools:ignore="RtlSymmetry"` suppressed the lint warning about adding `android:paddingStart`, which wouldn't work with this layout.
+                `tools:ignore="ContentDescription"` suppresses the lint warning about supplying a content description for the image view,
+                which isn't needed in this case because the image view is only decorative. -->
+            <ImageView
+                android:id="@+id/icon"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:src="@mipmap/privacy_browser"
+                android:paddingTop="10dp"
+                android:paddingEnd="5dp"
+                tools:ignore="RtlSymmetry,ContentDescription" />
+
+            <TextView
+                android:id="@+id/privacy_browser_textview"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/privacy_browser"
+                android:textStyle="bold"
+                android:textSize="22sp"
+                android:textColor="?attr/blueTitleTextColor"
+                android:paddingTop="12dp"
+                android:layout_toEndOf="@id/icon" />
+
+            <TextView
+                android:id="@+id/version"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textColor="?attr/blueTextColor"
+                android:textIsSelectable="true"
+                android:layout_below="@id/privacy_browser_textview"
+                android:layout_toEndOf="@id/icon" />
+        </RelativeLayout>
+
+        <!-- The purpose of this linear layout is to provide padding on the start of the text views to make them line up with `about_version_icon`.
+             Although we don't need it, we have to include `android:paddingEnd` to make lint happy. -->
+        <LinearLayout
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:orientation="vertical"
+            android:paddingTop="16dp"
+            android:paddingStart="4dp"
+            android:paddingEnd="0dp" >
+
+            <!-- Hardware. -->
+            <TextView
+                android:id="@+id/hardware"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/hardware"
+                android:textStyle="bold"
+                android:textSize="18sp"
+                android:textColor="?attr/blueTitleTextColor" />
+
+            <TextView
+                android:id="@+id/brand"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/manufacturer"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/model"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/device"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/bootloader"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/radio"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <!-- Software. -->
+            <TextView
+                android:id="@+id/software"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/software"
+                android:textStyle="bold"
+                android:textSize="18sp"
+                android:textColor="?attr/blueTitleTextColor"
+                android:paddingTop="12dp" />
+
+            <TextView
+                android:id="@+id/android"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/security_patch"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/build"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/webview_provider"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/webview_version"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/orbot"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/i2p"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/open_keychain"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <!-- Memory usage. -->
+            <TextView
+                android:id="@+id/memory_usage"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/memory_usage"
+                android:textStyle="bold"
+                android:textSize="18sp"
+                android:textColor="?attr/blueTitleTextColor"
+                android:paddingTop="12dp" />
+
+            <TextView
+                android:id="@+id/app_consumed_memory"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/app_available_memory"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/app_total_memory"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/app_maximum_memory"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/system_consumed_memory"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/system_available_memory"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/system_total_memory"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <!-- Blocklists. -->
+            <TextView
+                android:id="@+id/blocklists"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/blocklists"
+                android:textStyle="bold"
+                android:textSize="18sp"
+                android:textColor="?attr/blueTitleTextColor"
+                android:paddingTop="12dp" />
+
+            <TextView
+                android:id="@+id/easylist"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/easyprivacy"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/fanboy_annoyance"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/fanboy_social"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/ultralist"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/ultraprivacy"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <!-- Package Signature. -->
+            <TextView
+                android:id="@+id/package_signature"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:text="@string/package_signature"
+                android:textStyle="bold"
+                android:textSize="18sp"
+                android:textColor="?attr/blueTitleTextColor"
+                android:paddingTop="12dp" />
+
+            <TextView
+                android:id="@+id/certificate_issuer_dn"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/certificate_subject_dn"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/certificate_start_date"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/certificate_end_date"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/certificate_version"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/certificate_serial_number"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
+            <TextView
+                android:id="@+id/certificate_signature_algorithm"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+        </LinearLayout>
+    </LinearLayout>
+</ScrollView>
\ No newline at end of file
index a8f03aa43b8cf1cb4e8a625c904ba8984ef92503..606fd94e07da915f53912d7fb63d60c532c78938 100644 (file)
@@ -27,6 +27,7 @@
 <resources xmlns:tools="http://schemas.android.com/tools">
     <!-- Activities. -->
     <string name="privacy_browser">Privacy Browser</string>
+    <string name="short_name">Browser</string>
     <!-- For translations, `android_asset_path` should be the localization abbreviation.  This should not be translated unless the Guide and About sections are localized. -->
     <string name="android_asset_path">de</string>
 
     <string name="file_is_mht">Die Datei ist ein MHT-Web-Archiv.</string>
     <string name="mht_checkbox_explanation">Manchmal müssen MIME-gekapselte HTML-Web-Archive (MHT) manuell festgelegt werden, um korrekt geöffnet zu werden.</string>
 
-    <!-- Save Dialogs. -->
+    <!-- Save Dialog. -->
     <string name="save_url">URL speichern</string>
     <string name="save_archive">Archiv speichern</string>
     <string name="save_text">Text speichern</string>
     <string name="save_image">Grafik speichern</string>
-    <string name="save_logcat">Logcat speichern</string>
     <string name="file_name">Dateiname</string>
-    <string name="privacy_browser_logcat_txt">Privacy Browser Logcat.txt</string>
-    <string name="privacy_browser_version_txt">Privacy Browser Version.txt</string>
-    <string name="privacy_browser_version_png">Privacy Browser Version.png</string>
     <string name="file">Datei</string>
     <string name="bytes">Bytes</string>
     <string name="unknown_size">Unbekannte Größe</string>
     <string name="export_failed">Export fehlgeschlagen:</string>
     <string name="import_failed">Import fehlgeschlagen:</string>
 
-    <!-- Logcat. -->
+    <!-- Logcat.  Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
+        The `%1$s` code inserts variables into the displayed text and should be preserved in translation.-->
     <string name="copy">kopieren</string>
-    <string name="logcat_copied">Logcat kopiert.</string>
     <string name="clear">leeren</string>
+    <string name="logcat_copied">Logcat kopiert.</string>
+    <string name="privacy_browser_logcat_txt">Privacy Browser %1$s Logcat.txt</string>
+    <string name="saved">%1$s gespeichert.</string>
+    <string name="error_saving_logcat">Fehler beim Speichern von Logcat: \u0020 %1$s</string>
 
     <!-- Guide. -->
     <string name="overview">Übersicht</string>
     <string name="custom_proxy_invalid">Die benutzerdefinierte Proxy-URL ist ungültig.</string>
     <string name="socks_proxies_do_not_work_on_kitkat">SOCKS-Proxies funktionieren nicht unter Android KitKat.</string>
 
-    <!-- About Activity. -->
+    <!-- About Activity.  The `%1$s` code inserts variables into the displayed text and should be preserved in translation. -->
     <string name="about_privacy_browser">Über Privacy Browser</string>
     <string name="version">Version</string>
         <string name="version_code">Versions-Code</string>
             <string name="serial_number">Seriennummer:</string>
             <string name="signature_algorithm">Signaturalgorithmus:</string>
         <string name="version_info_copied">Versions-Information wurde kopiert.</string>
+        <string name="privacy_browser_version_txt">Privacy Browser Version %1$s.txt</string>
+        <string name="privacy_browser_version_png">Privacy Browser Version %1$s.png</string>
     <string name="permissions">Berechtigungen</string>
     <string name="privacy_policy">Datenschutzrichtlinie</string>
     <string name="changelog">Changelog</string>
         <string name="download_with_external_app_summary">Eine externe App verwenden, um Dateien herunterzuladen.</string>
         <string name="scroll_app_bar">App-Leiste scrollen</string>
         <string name="scroll_app_bar_summary">Scrollt die App-Leiste mit der URL nach oben, wenn die Webseite gescrollt wird.</string>
+        <string name="bottom_app_bar">Untere Anwendungs-Leiste</string>
+        <string name="bottom_app_bar_summary">Zeigt die Anwendungs-Leiste am unteren Bildschirmrand an. Nach Ändern dieser Einstellung wird Privacy Browser neu gestartet.</string>
         <string name="display_additional_app_bar_icons">Weitere Icons in der Titelleiste</string>
         <string name="display_additional_app_bar_icons_summary">Icons zum Neu-Laden von WebView und - so genug Platz zur Verfügung steht -
             zum Öffnen der Lesezeichen und zum Umschalten von Cookies in der App-Leiste anzeigen.</string>
index 2c19399375dce4d9a9f6d938684b295a32be3b52..2b0ab540213f932f9bac40de8df7917963eca4fb 100644 (file)
@@ -23,6 +23,7 @@
 <resources>
     <!-- Activities. -->
     <string name="privacy_browser">Navegador Privado</string>
+    <string name="short_name">Browser</string>
     <!-- For translations, `android_asset_path` should be the localization abbreviation.  This should not be translated unless the Guide and About sections are localized. -->
     <string name="android_asset_path">es</string>
 
     <string name="file_is_mht">El archivo es un archivo de web MHT.</string>
     <string name="mht_checkbox_explanation">A veces se necesita especificar manualmente los archivos web MIME Encapsulated HTML (MHT) para que se abran correctamente.</string>
 
-    <!-- Save Dialogs. -->
+    <!-- Save Dialog. -->
     <string name="save_url">Guardar URL</string>
     <string name="save_archive">Guardar archivo</string>
     <string name="save_text">Guardar texto</string>
     <string name="save_image">Guardar imagen</string>
-    <string name="save_logcat">Guardar logcat</string>
     <string name="file_name">Nombre de archivo</string>
-    <string name="privacy_browser_logcat_txt">Navegador Privado Logcat.txt</string>
-    <string name="privacy_browser_version_txt">Versión de Navegador Privado.txt</string>
-    <string name="privacy_browser_version_png">Versiótoutnern de Navegador Privado.png</string>
     <string name="file">Archivo</string>
     <string name="bytes">bytes</string>
     <string name="unknown_size">Tamaño desconocido</string>
     <string name="export_failed">Exportación fallida:</string>
     <string name="import_failed">Importación fallida:</string>
 
-    <!-- Logcat. -->
+    <!-- Logcat.  Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
+        The `%1$s` code inserts variables into the displayed text and should be preserved in translation.-->
     <string name="copy">Copiar</string>
-    <string name="logcat_copied">Logcat copiado.</string>
     <string name="clear">Borrar</string>
+    <string name="logcat_copied">Logcat copiado.</string>
+    <string name="privacy_browser_logcat_txt">Navegador Privado %1$s Logcat.txt</string>
+    <string name="saved">%1$s guardado.</string>
+    <string name="error_saving_logcat">Error guardando logcat: \u0020 %1$s</string>
 
     <!-- Guide. -->
     <string name="overview">Visión general</string>
     <string name="custom_proxy_invalid">La URL del proxy personalizado no es válida.</string>
     <string name="socks_proxies_do_not_work_on_kitkat">SOCKS proxies do not work on Android KitKat.</string>
 
-    <!-- About Activity. -->
+    <!-- About Activity.  The `%1$s` code inserts variables into the displayed text and should be preserved in translation. -->
     <string name="about_privacy_browser">Acerca de Navegador Privado</string>
     <string name="version">Versión</string>
         <string name="version_code">código de versión</string>
             <string name="serial_number">Número de serie:</string>
             <string name="signature_algorithm">Algoritmo de firma:</string>
         <string name="version_info_copied">Información de la versión copiada.</string>
+        <string name="privacy_browser_version_txt">Versión de Navegador Privado %1$s.txt</string>
+        <string name="privacy_browser_version_png">Versión de Navegador Privado %1$s.png</string>
     <string name="permissions">Permisos</string>
     <string name="privacy_policy">Política de privacidad</string>
     <string name="changelog">Historial de cambios</string>
         <string name="download_with_external_app_summary">Use una app externa para descargar archivos.</string>
         <string name="scroll_app_bar">Desplazar la barra de aplicaciones</string>
         <string name="scroll_app_bar_summary">Desplazar la barra de aplicaciones desde la parte superior de la pantalla cuando el WebView se desplaza hacia abajo.</string>
+        <string name="bottom_app_bar">Barra inferior de la app</string>
+        <string name="bottom_app_bar_summary">Mover la barra de apps a la parte inferior de la pantalla.  Al cambiar esta configuración se reiniciará Navegador Privado.</string>
         <string name="display_additional_app_bar_icons">Mostrar iconos adicionales en la barra de aplicación</string>
         <string name="display_additional_app_bar_icons_summary">Mostrar iconos en la barra de aplicaciones para refrescar el WebView y, si hay espacio,
             para abrir el cajón de marcadores y cambiar las cookies.</string>
index 31c8d18ca8af85bc240924cd724c4a84b887a0a4..291d5c791ecf4df6a5813acdccf848376a1b33b1 100644 (file)
@@ -24,6 +24,7 @@
 <resources>
     <!-- Activities. -->
     <string name="privacy_browser">Privacy Browser</string>
+    <string name="short_name">Browser</string>
     <!-- For translations, `android_asset_path` should be the localization abbreviation.  For example, Spanish is `es`.  This should not be translated unless the Guide and About sections are localized. -->
     <string name="android_asset_path">fr</string>
 
     <string name="file_is_mht">Le fichier est une archive web MHT.</string>
     <string name="mht_checkbox_explanation">Parfois, les archives web MHT (MIME Encapsulated HTML) doivent être spécifiées manuellement pour être ouvertes correctement.</string>
 
-    <!-- Save Dialogs. -->
+    <!-- Save Dialog. -->
     <string name="save_url">Enregistrer l\'URL</string>
     <string name="save_archive">Enregistrer l\'archive</string>
     <string name="save_text">Sauvegarder le texte</string>
     <string name="save_image">Sauvegarder en tant qu\'image</string>
-    <string name="save_logcat">Sauvegarder le journal système</string>
     <string name="file_name">Nom du fichier</string>
-    <string name="privacy_browser_logcat_txt">Privacy Browser Logcat.txt</string>
-    <string name="privacy_browser_version_txt">Privacy Browser Version.txt</string>
-    <string name="privacy_browser_version_png">Privacy Browser Version.png</string>
     <string name="file">Fichier</string>
     <string name="bytes">octets</string>
     <string name="unknown_size">taille inconnue</string>
     <string name="export_failed">L\'export a échoué :</string>
     <string name="import_failed">L\'import a échoué :</string>
 
-    <!-- Logcat. -->
+    <!-- Logcat.  Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
+        The `%1$s` code inserts variables into the displayed text and should be preserved in translation.-->
     <string name="copy">Copie</string>
-    <string name="logcat_copied">Journal système copié.</string>
     <string name="clear">Vider</string>
+    <string name="logcat_copied">Journal système copié.</string>
+    <string name="privacy_browser_logcat_txt">Privacy Browser %1$s Logcat.txt</string>
+    <string name="saved">%1$s sauvegardé.</string>
+    <string name="error_saving_logcat">Erreur de sauvegarde du logcat: \u0020 %1$s</string>
 
     <!-- Guide. -->
     <string name="overview">Présentation</string>
     <string name="custom_proxy_invalid">L\'URL du proxy personnalisé n\'est pas valide.</string>
     <string name="socks_proxies_do_not_work_on_kitkat">Les proxys de type SOCKS ne fonctionnent pas sur Android KitKat.</string>
 
-    <!-- About Activity. -->
+    <!-- About Activity.  The `%1$s` code inserts variables into the displayed text and should be preserved in translation. -->
     <string name="about_privacy_browser">À propos</string>
     <string name="version">Version</string>
         <string name="version_code">Code de la version</string>
             <string name="serial_number">Numéro de série :</string>
             <string name="signature_algorithm">Algorithme de chiffrement :</string>
         <string name="version_info_copied">Informations de version copiées.</string>
+        <string name="privacy_browser_version_txt">Privacy Browser Version %1$s.txt</string>
+        <string name="privacy_browser_version_png">Privacy Browser Version %1$s.png</string>
     <string name="permissions">Permissions</string>
     <string name="privacy_policy">Politique de confidentialité</string>
     <string name="changelog">Journal des changements</string>
         <string name="swipe_to_refresh_summary">Certains sites Web ne fonctionnent pas bien lorsque "Glisser pour rafraîchir" est activé.</string>
         <string name="download_with_external_app">Téléchargement avec une app externe</string>
         <string name="download_with_external_app_summary">Utiliser une application externe pour télécharger des fichiers.</string>
+        <string name="bottom_app_bar">Barre d\'application en bas</string>
+        <string name="bottom_app_bar_summary">Déplacer la barre d\'application vers le bas de l\'écran. La modification de ce paramètre entraîne le redémarrage de Privacy Browser.</string>
         <string name="scroll_app_bar">Défilement barre d\'applications</string>
         <string name="scroll_app_bar_summary">Faites défiler la barre d\'applications en haut de l\'écran lorsque WebView défile vers le bas.</string>
         <string name="display_additional_app_bar_icons">Icônes supplémentaires dans la barre d\'applications</string>
index 2a9af802f06f7181749b1a252e756ba0465ebdcf..e229f8e5565d533673e018d6afafe0386bd5d20c 100644 (file)
@@ -23,6 +23,7 @@
 <resources>
     <!-- Activities. -->
     <string name="privacy_browser">Privacy Browser</string>
+    <string name="short_name">Browser</string>
     <!-- For translations, `android_asset_path` should be the localization abbreviation.  This should not be translated unless the Guide and About sections are localized. -->
     <string name="android_asset_path">it</string>
 
     <string name="file_is_mht">Questo file è un archivio web MHT.</string>
     <string name="mht_checkbox_explanation">Talvolta gli archivi web del tipo MIME Encapsulated HTML (MHT) devono essere specificati manualmente per essere aperti correttamente.</string>
 
-    <!-- Save Dialogs. -->
+    <!-- Save Dialog. -->
     <string name="save_url">Salva URL</string>
     <string name="save_archive">Salva Archivio</string>
     <string name="save_text">Salva Testo</string>
     <string name="save_image">Salva Immagine</string>
-    <string name="save_logcat">Salva il log</string>
     <string name="file_name">Nome File</string>
-    <string name="privacy_browser_logcat_txt">Privacy Browser Logcat.txt</string>
-    <string name="privacy_browser_version_txt">Versione di Privacy Browser.txt</string>
-    <string name="privacy_browser_version_png">Versione di Privacy Browser.png</string>
     <string name="file">File</string>
     <string name="bytes">byte</string>
     <string name="unknown_size">Dimensione sconosciuta</string>
     <string name="export_failed">Esportazione fallita:</string>
     <string name="import_failed">Importazione fallita:</string>
 
-    <!-- Logcat. -->
+    <!-- Logcat.  Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
+        The `%1$s` code inserts variables into the displayed text and should be preserved in translation.-->
     <string name="copy">Copia</string>
-    <string name="logcat_copied">Logcat copiato.</string>
     <string name="clear">Cancella</string>
+    <string name="logcat_copied">Logcat copiato.</string>
+    <string name="privacy_browser_logcat_txt">Privacy Browser %1$s Logcat.txt</string>
+    <string name="saved">%1$s salvato.</string>
+    <string name="error_saving_logcat">Errore salvataggio logcat: \u0020 %1$s</string>
 
     <!-- Guide. -->
     <string name="overview">Descrizione</string>
     <string name="custom_proxy_invalid">La URL del proxy personalizzato non è valida.</string>
     <string name="socks_proxies_do_not_work_on_kitkat">I proxy SOCKS non funzionano con Android KitKat.</string>
 
-    <!-- About Activity. -->
+    <!-- About Activity.  The `%1$s` code inserts variables into the displayed text and should be preserved in translation. -->
     <string name="about_privacy_browser">Informazioni su Privacy Browser</string>
     <string name="version">Versione</string>
         <string name="version_code">codice versione</string>
             <string name="serial_number">Numero di Serie:</string>
             <string name="signature_algorithm">Algoritmo di firma:</string>
         <string name="version_info_copied">Info sulla Versione copiate.</string>
+        <string name="privacy_browser_version_txt">Versione di Privacy Browser %1$s.txt</string>
+        <string name="privacy_browser_version_png">Versione di Privacy Browser %1$s.png</string>
     <string name="permissions">Autorizzazioni</string>
     <string name="privacy_policy">Privacy Policy</string>
     <string name="changelog">Changelog</string>
         <string name="download_with_external_app_summary">Utilizza una applicazione esterna per scaricare i file.</string>
         <string name="scroll_app_bar">Permetti lo scrolling della barra dell\'applicazione</string>
         <string name="scroll_app_bar_summary">Permette lo scorrere della barra dell\'applicazione dalla parte alta dello schermo quando si effettua lo scrolling.</string>
+        <string name="bottom_app_bar">Barra dell\'app in basso</string>
+        <string name="bottom_app_bar_summary">Sposta la barra dell\'app nella parte bassa dello schermo.  La modifica di questa impostazione provocherà il riavvio di Privacy Browser.</string>
         <string name="display_additional_app_bar_icons">Mostra icone addizionali nella barra dell\'applicazione</string>
         <string name="display_additional_app_bar_icons_summary">Mostra nella barra dell\'applicazione le icone per l\'aggiornamento della pagina e, se lo spazio è disponibile,
             per aprire i preferiti e per abilitare o disabilitare i cookie.</string>
index f92a1b80e14953de2df4f0b8932198760b447c72..5d369bf980ffe66c0f72ffbd07e1ccb6cf3e47c0 100644 (file)
         <item name="lockBlueIcon">@drawable/lock_night</item>
         <item name="moveToFolderBlueIcon">@drawable/move_to_folder_blue_night</item>
         <item name="proxyBlueIcon">@drawable/proxy_enabled_night</item>
-        <item name="saveBlueIcon">@drawable/save_dialog_night</item>
-        <item name="saveTextBlueIcon">@drawable/save_text_blue_night</item>
         <item name="sslCertificateBlueIcon">@drawable/ssl_certificate_enabled_night</item>
     </style>
 </resources>
\ No newline at end of file
index 1f147492c85cfde7e58ae7c85752f81e9384a37f..860772889db19659ba71ae9a4e107dffe24ddc13 100644 (file)
         <item name="lockBlueIcon">@drawable/lock_night</item>
         <item name="moveToFolderBlueIcon">@drawable/move_to_folder_blue_night</item>
         <item name="proxyBlueIcon">@drawable/proxy_enabled_night</item>
-        <item name="saveBlueIcon">@drawable/save_dialog_night</item>
-        <item name="saveTextBlueIcon">@drawable/save_text_blue_night</item>
         <item name="sslCertificateBlueIcon">@drawable/ssl_certificate_enabled_night</item>
     </style>
 </resources>
\ No newline at end of file
index eeeb5f79c9a6c7d8e4d629aed61ed65207f54ba9..25c206d9618da1ed08f1d489ba6c70a7bf448dc1 100644 (file)
@@ -21,6 +21,7 @@
 <!-- Colors are currently hardcoded in the vector drawables.  Once the minimum API is >= 22 the hardcoded colors can be removed and they can reference these entries instead. -->
 <resources>
     <!-- Nicknamed colors. -->
+    <color name="about_version_blue_text">@color/violet_700</color>
     <color name="blue_text">@color/violet_500</color>
 
     <!-- Raw colors. -->
index 51a456e83da17d5eab9b103ffd1d1d66e16ab85f..c9c6bf7aaf36499dd98e495c59c4563e08f6894b 100644 (file)
@@ -92,8 +92,6 @@
         <item name="lockBlueIcon">@drawable/lock_night</item>
         <item name="moveToFolderBlueIcon">@drawable/move_to_folder_blue_night</item>
         <item name="proxyBlueIcon">@drawable/proxy_enabled_night</item>
-        <item name="saveBlueIcon">@drawable/save_dialog_night</item>
-        <item name="saveTextBlueIcon">@drawable/save_text_blue_night</item>
         <item name="sslCertificateBlueIcon">@drawable/ssl_certificate_enabled_night</item>
     </style>
 </resources>
\ No newline at end of file
index b06b86b89898c34f585cb919cbd62e8611fd297d..436320b77db7d1a0a4a73d4740eba7c1cb161fec 100644 (file)
     <string name="file_is_mht">Este é um arquivo MHT da web.</string>
     <string name="mht_checkbox_explanation">Às vezes, os arquivos da web MIME Encapsulated HTML (MHT) precisam ser especificados manualmente para serem abertos corretamente.</string>
 
-    <!-- Save Dialogs. -->
+    <!-- Save Dialog. -->
     <string name="save_url">Salvar URL</string>
     <string name="save_archive">Salvar Arquivo</string>
     <string name="save_text">Salvar Texto</string>
     <string name="save_image">Salvar Imagem</string>
-    <string name="save_logcat">Salvar logcat</string>
     <string name="file_name">Nome do Arquivo</string>
-    <string name="privacy_browser_logcat_txt">Privacy Browser Logcat.txt</string>
-    <string name="privacy_browser_version_txt">Privacy Browser Versão.txt</string>
-    <string name="privacy_browser_version_png">Privacy Browser Versão.png</string>
     <string name="file">Arquivo</string>
     <string name="bytes">bytes</string>
     <string name="unknown_size">tamanho desconhecido</string>
     <string name="export_failed">A exportação falhou:</string>
     <string name="import_failed">A importação falhou:</string>
 
-    <!-- Logcat. -->
+    <!-- Logcat.  Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
+        The `%1$s` code inserts variables into the displayed text and should be preserved in translation.-->
     <string name="copy">Cópia</string>
-    <string name="logcat_copied">Logcat copiado.</string>
     <string name="clear">Limpar</string>
+    <string name="logcat_copied">Logcat copiado.</string>
+    <string name="privacy_browser_logcat_txt">Privacy Browser %1$s Logcat.txt</string>
 
     <!-- Guide. -->
     <string name="overview">Visão geral</string>
     <string name="custom_proxy_invalid">O URL do proxy personalizado é inválido.</string>
     <string name="socks_proxies_do_not_work_on_kitkat">Os proxies SOCKS não funcionam no Android KitKat.</string>
 
-    <!-- About Activity. -->
+    <!-- About Activity.  The `%1$s` code inserts variables into the displayed text and should be preserved in translation. -->
     <string name="about_privacy_browser">Sobre o Privacy Browser</string>
     <string name="version">Versão</string>
         <string name="version_code">Código da Versão</string>
             <string name="serial_number">Número de série:</string>
             <string name="signature_algorithm">Algoritmo de Assinatura:</string>
         <string name="version_info_copied">Informações de versão copiada.</string>
+        <string name="privacy_browser_version_txt">Privacy Browser Versão %1$s.txt</string>
+        <string name="privacy_browser_version_png">Privacy Browser Versão %1$s.png</string>
     <string name="permissions">Permissões</string>
     <string name="privacy_policy">Política de Privacidade</string>
     <string name="changelog">Changelog</string>
index 3ca83262889bb165fd07c964c9d60745fc4a7e97..2ffe8c6ed73656b9a2c7562936d52c09063f59bd 100644 (file)
@@ -21,6 +21,7 @@
 <resources>
     <!-- Activities. -->
     <string name="privacy_browser">Privacy Browser</string>
+    <string name="short_name">Браузер</string>
     <!-- For translations, `android_asset_path` should be the localization abbreviation.  This should not be translated unless the Guide and About sections are localized. -->
     <string name="android_asset_path">ru</string> -->
 
     <string name="file_is_mht">Файл представляет собой веб-архив MHT.</string>
     <string name="mht_checkbox_explanation">Иногда для корректного открытия веб-архивов MIME Encapsulated HTML (MHT) необходимо указать вручную.</string>
 
-    <!-- Save Dialogs. -->
+    <!-- Save Dialog. -->
     <string name="save_url">Сохранить URL</string>
     <string name="save_archive">Сохранить архив</string>
     <string name="save_text">Сохранить текст</string>
     <string name="save_image">Сохранить изображение</string>
-    <string name="save_logcat">Сохранить logcat</string>
     <string name="file_name">Имя файла</string>
-    <string name="privacy_browser_logcat_txt">Privacy Browser Logcat.txt</string>
-    <string name="privacy_browser_version_txt">Версия Privacy Browser.txt</string>
-    <string name="privacy_browser_version_png">Версия Privacy Browser.png</string>
     <string name="file">Файл</string>
     <string name="bytes">байтов</string>
     <string name="unknown_size">неизвестный размер</string>
     <string name="export_failed">Сбой при экспорте:</string>
     <string name="import_failed">Сбой при импорте:</string>
 
-    <!-- Logcat. -->
+    <!-- Logcat.  Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
+        The `%1$s` code inserts variables into the displayed text and should be preserved in translation.-->
     <string name="copy">Копировать</string>
-    <string name="logcat_copied">Logcat скопирован.</string>
     <string name="clear">Очистить</string>
+    <string name="logcat_copied">Logcat скопирован.</string>
+    <string name="privacy_browser_logcat_txt">Privacy Browser %1$s Logcat.txt</string>
+    <string name="saved">%1$s сохранен.</string>
+    <string name="error_saving_logcat">Ошибка сохранения logcat: \u0020 %1$s</string>
 
     <!-- Guide. -->
     <string name="overview">Обзор</string>
     <string name="custom_proxy_invalid">URL пользовательского прокси недействителен.</string>
     <string name="socks_proxies_do_not_work_on_kitkat">SOCKS-прокси не работает на Android KitKat.</string>
 
-    <!-- About Activity. -->
+    <!-- About Activity.  The `%1$s` code inserts variables into the displayed text and should be preserved in translation. -->
     <string name="about_privacy_browser">О Privacy Browser</string>
     <string name="version">Версия</string>
         <string name="version_code">код версии</string>
             <string name="serial_number">Серийный номер:</string>
             <string name="signature_algorithm">Алгоритм подписи:</string>
         <string name="version_info_copied">Информация о версии скопирована.</string>
+        <string name="privacy_browser_version_txt">Версия Privacy Browser %1$s.txt</string>
+        <string name="privacy_browser_version_png">Версия Privacy Browser %1$s.png</string>
     <string name="permissions">Разрешения</string>
     <string name="privacy_policy">Политика конфиденциальности</string>
     <string name="changelog">История изменений</string>
         <string name="download_with_external_app_summary">Использовать внешнее приложение для загрузки файлов.</string>
         <string name="scroll_app_bar">Прокручивать панель приложения</string>
         <string name="scroll_app_bar_summary">Прокручивает панель приложения вверху экрана при прокрутке WebView вниз.</string>
+        <string name="bottom_app_bar">Нижняя панель приложения</string>
+        <string name="bottom_app_bar_summary">Перемещает панель приложения в нижнюю часть экрана. Изменение этой настройки приведет к перезапуску Privacy Browser.</string>
         <string name="display_additional_app_bar_icons">Отображать дополнительные значки на панели приложения</string>
         <string name="display_additional_app_bar_icons_summary">Показывать в панели приложения значки для обновления WebView и, если есть место, для открытия окна закладок и переключения cookie.</string>
         <string name="app_theme">Тема приложения</string>
index 7a63ad231cc3150d86883c84ec88364bcac848da..dfaf9a423e19b1f5c32c0e9f84274cc22f02edf7 100644 (file)
     <string name="previous">Önceki</string>
     <string name="next">Sonraki</string>
 
-    <!-- Save Dialogs. -->
+    <!-- Save Dialog. -->
     <string name="save_image">Resmi kaydet</string>
-    <string name="save_logcat">Logcat kaydet</string>
     <string name="file_name">Dosya adı</string>
     <string name="unknown_size">Bilinmeyen boyut</string>
-    <string name="privacy_browser_logcat_txt">Privacy Browser Logcat.txt</string>
 
     <!-- View Source. -->
     <string name="request_headers">İstek Başlıkları</string>
     <string name="export_failed">Dışa aktarım başarısız:</string>
     <string name="import_failed">İçe aktarım başarısız:</string>
 
-    <!-- Logcat. -->
+    <!-- Logcat.  Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
+        The `%1$s` code inserts variables into the displayed text and should be preserved in translation.-->
     <string name="copy">Kopyala</string>
-    <string name="logcat_copied">Logcat kopyalandı.</string>
     <string name="clear">Temizle</string>
+    <string name="logcat_copied">Logcat kopyalandı.</string>
+    <string name="privacy_browser_logcat_txt">Privacy Browser %1$s Logcat.txt</string>
 
     <!-- Guide. -->
     <string name="overview">Genel Bakış</string>
index 266d5b7a2e5448e9ae88a896012da3a46f79a759..135a558d6e4615c708acb4d29333777a5c80cfbd 100644 (file)
         <item name="lockBlueIcon">@drawable/lock_day</item>
         <item name="moveToFolderBlueIcon">@drawable/move_to_folder_blue_day</item>
         <item name="proxyBlueIcon">@drawable/proxy_enabled_day</item>
-        <item name="saveBlueIcon">@drawable/save_dialog_day</item>
-        <item name="saveTextBlueIcon">@drawable/save_text_blue_day</item>
         <item name="sslCertificateBlueIcon">@drawable/ssl_certificate_enabled_day</item>
     </style>
 </resources>
\ No newline at end of file
index 2cfe87ee9869394f2612d6b82dea9452e27584cd..d8320f9b3115b8515a0e77f16f606bbf88ac4dc5 100644 (file)
         <item name="lockBlueIcon">@drawable/lock_day</item>
         <item name="moveToFolderBlueIcon">@drawable/move_to_folder_blue_day</item>
         <item name="proxyBlueIcon">@drawable/proxy_enabled_day</item>
-        <item name="saveBlueIcon">@drawable/save_dialog_day</item>
-        <item name="saveTextBlueIcon">@drawable/save_text_blue_day</item>
         <item name="sslCertificateBlueIcon">@drawable/ssl_certificate_enabled_day</item>
     </style>
 </resources>
\ No newline at end of file
index 02e1b5060a1fc14daa1acb8f1b40ec50553192a6..ca8f69247df81748802eed9c1f45e789e7bfc67e 100644 (file)
@@ -73,7 +73,5 @@
     <attr name="lockBlueIcon" format="reference" />
     <attr name="moveToFolderBlueIcon" format="reference" />
     <attr name="proxyBlueIcon" format="reference" />
-    <attr name="saveBlueIcon" format="reference" />
-    <attr name="saveTextBlueIcon" format="reference" />
     <attr name="sslCertificateBlueIcon" format="reference" />
 </resources>
\ No newline at end of file
index 69bf0664df2d0bb21628ff90fa8ff9433ed32c25..df9ed5082c341ef5e5152b5b5b9afcbcab030987 100644 (file)
@@ -21,6 +21,7 @@
 <!-- Colors are currently hardcoded in the vector drawables.  Once the minimum API is >= 22 the hardcoded colors can be removed and they can reference these entries instead. -->
 <resources>
     <!-- Nicknamed colors. -->
+    <color name="about_version_blue_text">@color/blue_700</color>
     <color name="blue_text">@color/blue_700</color>
 
     <!-- Raw colors. -->
index fa19be3e8a25099ba6d889465e0f86660c1d760b..4db01edaeb8c597a02fa29187b1b74a1ff78d79f 100644 (file)
     <string name="file_is_mht">The file is an MHT web archive.</string>
     <string name="mht_checkbox_explanation">Sometimes MIME Encapsulated HTML (MHT) web archives need to be manually specified to be opened correctly.</string>
 
-    <!-- Save Dialogs. -->
+    <!-- Save Dialog. -->
     <string name="save_dialog" translatable="false">Save Dialog</string>  <!-- This string is used to tag the save dialog.  It is never displayed to the user. -->
     <string name="save_url">Save URL</string>
     <string name="save_archive">Save Archive</string>
     <string name="save_text">Save Text</string>
     <string name="save_image">Save Image</string>
-    <string name="save_logcat">Save Logcat</string>
     <string name="file_name">File name</string>
-    <string name="privacy_browser_logcat_txt">Privacy Browser Logcat.txt</string>
-    <string name="privacy_browser_version_txt">Privacy Browser Version.txt</string>
-    <string name="privacy_browser_version_png">Privacy Browser Version.png</string>
     <string name="file">File</string>
     <string name="bytes">bytes</string>
     <string name="unknown_size">unknown size</string>
     <string name="export_failed">Export failed:</string>
     <string name="import_failed">Import failed:</string>
 
-    <!-- Logcat. -->
+    <!-- Logcat.  Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
+        The `%1$s` code inserts variables into the displayed text and should be preserved in translation.-->
     <string name="copy">Copy</string>
-    <string name="logcat_copied">Logcat copied.</string>
     <string name="clear">Clear</string>
+    <string name="logcat_copied">Logcat copied.</string>
+    <string name="privacy_browser_logcat_txt">Privacy Browser %1$s Logcat.txt</string>
+    <string name="saved">%1$s saved.</string>
+    <string name="error_saving_logcat">Error saving logcat: \u0020 %1$s</string>
 
     <!-- Guide. -->
     <string name="overview">Overview</string>
     <string name="custom_proxy_invalid">The custom proxy URL is invalid.</string>
     <string name="socks_proxies_do_not_work_on_kitkat">SOCKS proxies do not work on Android KitKat.</string>
 
-    <!-- About Activity. -->
+    <!-- About Activity.  The `%1$s` code inserts variables into the displayed text and should be preserved in translation. -->
     <string name="about_privacy_browser">About Privacy Browser</string>
     <string name="version">Version</string>
         <string name="version_code">version code</string>
             <string name="serial_number">Serial Number:</string>
             <string name="signature_algorithm">Signature Algorithm:</string>
         <string name="version_info_copied">Version info copied.</string>
+        <string name="privacy_browser_version_txt">Privacy Browser Version %1$s.txt</string>
+        <string name="privacy_browser_version_png">Privacy Browser Version %1$s.png</string>
     <string name="permissions">Permissions</string>
     <string name="privacy_policy">Privacy Policy</string>
     <string name="changelog">Changelog</string>
index 4f5e9a2e6dc24f0a4987f82d3048755ce2f4027e..411cbede6b7f4f2a95c147312d0f5191e768482e 100644 (file)
@@ -92,8 +92,6 @@
         <item name="lockBlueIcon">@drawable/lock_day</item>
         <item name="moveToFolderBlueIcon">@drawable/move_to_folder_blue_day</item>
         <item name="proxyBlueIcon">@drawable/proxy_enabled_day</item>
-        <item name="saveBlueIcon">@drawable/save_dialog_day</item>
-        <item name="saveTextBlueIcon">@drawable/save_text_blue_day</item>
         <item name="sslCertificateBlueIcon">@drawable/ssl_certificate_enabled_day</item>
     </style>
 </resources>
\ No newline at end of file
index d384f0f0c29e6347f96fb4a6ed566705dd1e48bc..2e3d98b18f84f2442e36a5c42c9411d4da0aa0b8 100644 (file)
@@ -27,7 +27,7 @@ buildscript {
 
     dependencies {
         classpath 'com.android.tools.build:gradle:7.0.3'
-        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
+        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0"
 
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files