+\r
+\r
+\r
+ public void cancelWebView() {\r
+ Fragment fd = getSupportFragmentManager().findFragmentByTag(TAG_SAML_DIALOG);\r
+ if (fd != null && fd instanceof SherlockDialogFragment) {\r
+ Dialog d = ((SherlockDialogFragment)fd).getDialog();\r
+ if (d != null && d.isShowing()) {\r
+ d.dismiss();\r
+ }\r
+ }\r
+ \r
+ }\r
+\r
+ public void reloadWebView() {\r
+ Fragment fd = getSupportFragmentManager().findFragmentByTag(TAG_SAML_DIALOG);\r
+ if (fd != null && fd instanceof SamlWebViewDialog) {\r
+ ((SamlWebViewDialog) fd).reloadWebView();\r
+ }\r
+ }\r
+\r
+ @Override\r
+ public void onCancelCertificate() {\r
+ cancelWebView();\r
+ }\r
+ \r
+ /**\r
+ * Show untrusted cert dialog \r
+ */\r
+ public void showUntrustedCertDialog(X509Certificate x509Certificate, SslError error) {\r
+ // Show a dialog with the certificate info\r
+ SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstance(x509Certificate, error);\r
+ FragmentManager fm = getSupportFragmentManager();\r
+ FragmentTransaction ft = fm.beginTransaction();\r
+ dialog.show(ft, DIALOG_UNTRUSTED_CERT);\r
+ \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.newInstance(result, this);\r
+ FragmentManager fm = getSupportFragmentManager();\r
+ FragmentTransaction ft = fm.beginTransaction();\r
+ dialog.show(ft, DIALOG_UNTRUSTED_CERT);\r
+ \r
+ }\r
+ \r
+ /**\r
+ * Dismiss untrusted cert dialog\r
+ */\r
+ public void dismissUntrustedCertDialog(){\r
+ Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_UNTRUSTED_CERT);\r
+ if (frag != null) {\r
+ SslUntrustedCertDialog dialog = (SslUntrustedCertDialog) frag;\r
+ dialog.dismiss();\r
+ }\r
+ }\r
+ \r