X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FSslCertificateErrorDialog.kt;h=1090bedd2285244a368ada1b331059fa4f6c8eb5;hb=f441c077da729e1d3d97c9efb46e8380a0730dd9;hp=d146de5300c77c364ce7695e148d18e087561f54;hpb=1b27ac6f2b7c046945fc97e2aff9adbde8a152ce;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt index d146de53..1090bedd 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2022 Soren Stoutner . + * Copyright 2016-2022 Soren Stoutner . * * This file is part of Privacy Browser Android . * @@ -136,7 +136,7 @@ class SslCertificateErrorDialog : DialogFragment() { val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) // Set the icon. - dialogBuilder.setIcon(R.drawable.ssl_certificate_enabled) + dialogBuilder.setIcon(R.drawable.ssl_certificate) // Set the title. dialogBuilder.setTitle(R.string.ssl_certificate_error) @@ -226,7 +226,7 @@ class SslCertificateErrorDialog : DialogFragment() { val endDateStringBuilder = SpannableStringBuilder(endDateLabel + endDate) // Define the color spans. - val blueColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.blue_text)) + val blueColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.alt_blue_text)) val redColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.red_text)) // Setup the spans to display the certificate information in blue. `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction. @@ -322,6 +322,7 @@ class SslCertificateErrorDialog : DialogFragment() { private val activityWeakReference: WeakReference = WeakReference(activity) private val alertDialogWeakReference: WeakReference = WeakReference(alertDialog) + @Deprecated("Deprecated in Java") override fun doInBackground(vararg domainName: String): SpannableStringBuilder { // Get handles for the activity and the alert dialog. val activity = activityWeakReference.get() @@ -362,7 +363,7 @@ class SslCertificateErrorDialog : DialogFragment() { val ipAddressesStringBuilder = SpannableStringBuilder(ipAddressesLabel + ipAddresses) // Create a blue color span according to the theme. - val blueColorSpan = ForegroundColorSpan(activity.getColor(R.color.blue_text)) + val blueColorSpan = ForegroundColorSpan(activity.getColor(R.color.alt_blue_text)) // Set the string builder to display the certificate information in blue. `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction. ipAddressesStringBuilder.setSpan(blueColorSpan, ipAddressesLabel.length, ipAddressesStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) @@ -372,6 +373,7 @@ class SslCertificateErrorDialog : DialogFragment() { } // `onPostExecute()` operates on the UI thread. + @Deprecated("Deprecated in Java") override fun onPostExecute(ipAddresses: SpannableStringBuilder) { // Get handles for the activity and the alert dialog. val activity = activityWeakReference.get() @@ -389,4 +391,4 @@ class SslCertificateErrorDialog : DialogFragment() { ipAddressesTextView.text = ipAddresses } } -} \ No newline at end of file +}