- // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin. Also, the function can then be moved out of a companion object and just become a package-level function.
+ // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin.
@JvmStatic
fun displayDialog(host: String, realm: String, webViewFragmentId: Long): HttpAuthenticationDialog {
// Create an arguments bundle.
@JvmStatic
fun displayDialog(host: String, realm: String, webViewFragmentId: Long): HttpAuthenticationDialog {
// Create an arguments bundle.
@@ -106,26+107,15 @@ class HttpAuthenticationDialog: DialogFragment() {
val httpAuthHandler = nestedScrollWebView.httpAuthHandler
// Use an alert dialog builder to create the alert dialog.
val httpAuthHandler = nestedScrollWebView.httpAuthHandler
// Use an alert dialog builder to create the alert dialog.
- val dialogBuilder = AlertDialog.Builder(requireActivity(), R.style.PrivacyBrowserAlertDialog)
-
- // Get the current theme status.
- val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
+ val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
// Set the icon according to the theme.
// Set the icon according to the theme.
- if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {