+ if (errorString.startsWith("javax.net.ssl.SSLHandshakeException")) {
+ // Instantiate the untrusted SSL certificate dialog.
+ val untrustedSslCertificateDialog = UntrustedSslCertificateDialog()
+
+ // Show the untrusted SSL certificate dialog.
+ untrustedSslCertificateDialog.show(supportFragmentManager, getString(R.string.invalid_certificate))
+ } else {
+ // Display a snackbar with the error message.
+ Snackbar.make(swipeRefreshLayout, errorString, Snackbar.LENGTH_LONG).show()
+ }