+\r
+\r
+ /**\r
+ * Show untrusted cert dialog \r
+ */\r
+ public void showUntrustedCertDialog(X509Certificate x509Certificate, SslError error, SslErrorHandler handler) {\r
+ // Show a dialog with the certificate info\r
+ SslUntrustedCertDialog dialog = null;\r
+ if (x509Certificate == null) {\r
+ dialog = SslUntrustedCertDialog.newInstanceForEmptySslError(error, handler);\r
+ } else {\r
+ dialog = SslUntrustedCertDialog.newInstanceForFullSslError(x509Certificate, error, handler);\r
+ }\r
+ FragmentManager fm = getSupportFragmentManager();\r
+ FragmentTransaction ft = fm.beginTransaction();\r
+ ft.addToBackStack(null);\r
+ dialog.show(ft, DIALOG_UNTRUSTED_CERT);\r
+ }\r
+ \r
+ /**\r
+ * Show untrusted cert dialog \r
+ */\r
+ public void showUntrustedCertDialog(RemoteOperationResult result) {\r
+ // Show a dialog with the certificate info\r
+ SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstanceForFullSslError((CertificateCombinedException)result.getException());\r
+ FragmentManager fm = getSupportFragmentManager();\r
+ FragmentTransaction ft = fm.beginTransaction();\r
+ ft.addToBackStack(null);\r
+ dialog.show(ft, DIALOG_UNTRUSTED_CERT);\r
+ \r
+ }\r