]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/dialogs/UntrustedSslCertificateDialog.kt
First wrong button text in View Headers in night theme. https://redmine.stoutner...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / dialogs / UntrustedSslCertificateDialog.kt
index a1274c26d5629aa14c948b27d1131d8dd11a32bc..97eef400867848774a1b2e2b5ca97f0c1641f9c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2021-2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2021-2022 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
  *
@@ -55,8 +55,8 @@ class UntrustedSslCertificateDialog : DialogFragment() {
             // Use a builder to create the alert dialog.
             val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
-            // Set the icon according to the theme.
-            dialogBuilder.setIconAttribute(R.attr.sslCertificateBlueIcon)
+            // Set the icon.
+            dialogBuilder.setIcon(R.drawable.ssl_certificate)
 
             // Set the title.
             dialogBuilder.setTitle(R.string.ssl_certificate_error)
@@ -77,7 +77,7 @@ class UntrustedSslCertificateDialog : DialogFragment() {
             val alertDialog = dialogBuilder.create()
 
             // Get a handle for the shared preferences.
-            val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
+            val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireContext())
 
             // Get the screenshot preference.
             val allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false)
@@ -113,4 +113,4 @@ class UntrustedSslCertificateDialog : DialogFragment() {
             dialog!!.dismiss()
         }
     }
-}
\ No newline at end of file
+}