]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/dialogs/UntrustedSslCertificateDialog.kt
Fix a crash when opening a drawer while restarting. https://redmine.stoutner.com...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / dialogs / UntrustedSslCertificateDialog.kt
index 7b71746facdc7f170765d0ea6f58c5739c751cd7..beaa2eeaacc87cf01a095b085046da524a15be84 100644 (file)
@@ -53,7 +53,7 @@ class UntrustedSslCertificateDialog : DialogFragment() {
         // Check to see if the app has been restarted.
         if (savedInstanceState == null) {  // The app has not been restarted.
             // Use a builder to create the alert dialog.
-            val dialogBuilder: AlertDialog.Builder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
+            val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
             // Set the icon according to the theme.
             dialogBuilder.setIconAttribute(R.attr.sslCertificateBlueIcon)
@@ -80,7 +80,7 @@ class UntrustedSslCertificateDialog : DialogFragment() {
             val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
 
             // Get the screenshot preference.
-            val allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots), false)
+            val allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false)
 
             // Disable screenshots if not allowed.
             if (!allowScreenshots) {