X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FSslCertificateErrorDialog.kt;h=9a81641f8b8c24a155c930f9328b780ad741447e;hp=e0b27230ca25f59e97e6bcd08bf37a495a01aead;hb=dc36dea65a4eb37496fb1ecbbd9f8e1906f50216;hpb=12042264a50769030361cf51b0ac197050209f0f 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 e0b27230..9a81641f 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt @@ -56,8 +56,6 @@ private const val WEBVIEW_FRAGMENT_ID = "webview_fragment_id" class SslCertificateErrorDialog : DialogFragment() { companion object { - // `@JvmStatic` will no longer be required once all the code has transitioned to Kotlin. - @JvmStatic fun displayDialog(sslError: SslError, webViewFragmentId: Long): SslCertificateErrorDialog { // Get the various components of the SSL error message. val primaryErrorInt = sslError.primaryError @@ -114,10 +112,10 @@ class SslCertificateErrorDialog : DialogFragment() { val webViewFragmentId = requireArguments().getLong(WEBVIEW_FRAGMENT_ID) // Get the current position of this WebView fragment. - val webViewPosition = MainWebViewActivity.webViewPagerAdapter.getPositionForId(webViewFragmentId) + val webViewPosition = MainWebViewActivity.webViewPagerAdapter!!.getPositionForId(webViewFragmentId) // Get the WebView tab fragment. - val webViewTabFragment = MainWebViewActivity.webViewPagerAdapter.getPageFragment(webViewPosition) + val webViewTabFragment = MainWebViewActivity.webViewPagerAdapter!!.getPageFragment(webViewPosition) // Get the fragment view. val fragmentView = webViewTabFragment.requireView()