// 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)
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) {