+ @Override\r
+ public void onFailedSavingCertificate() {\r
+ dismissDialog(SAML_DIALOG_TAG);\r
+ Toast.makeText(this, R.string.ssl_validator_not_saved, Toast.LENGTH_LONG).show();\r
+ }\r
+\r
+ @Override\r
+ public void onCancelCertificate() {\r
+ dismissDialog(SAML_DIALOG_TAG);\r
+ }\r
+\r
+\r
+ private void doOnResumeAndBound() {\r
+ //Log.wtf(TAG, "registering to listen for operation callbacks" );\r
+ mOperationsServiceBinder.addOperationListener(AuthenticatorActivity.this, mHandler);\r
+ \r
+ \r
+ \r
+ if (mGetServerInfoOpId != -1) {\r
+ RemoteOperationResult result = \r
+ mOperationsServiceBinder.getOperationResultIfFinished(mGetServerInfoOpId);\r
+ if (result != null) {\r
+ //Log_OC.wtf(TAG, "found result of operation finished while rotating");\r
+ onGetServerInfoFinish(result);\r
+ }\r
+ \r
+ } else if (mOauth2GetAccessTokenOpId != -1) {\r
+ RemoteOperationResult result = \r
+ mOperationsServiceBinder.getOperationResultIfFinished(\r
+ mOauth2GetAccessTokenOpId);\r
+ if (result != null) {\r
+ //Log_OC.wtf(TAG, "found result of operation finished while rotating");\r
+ onGetOAuthAccessTokenFinish(result);\r
+ }\r
+ \r
+ } else if (mExistenceCheckOpId != -1) {\r
+ RemoteOperationResult result = \r
+ mOperationsServiceBinder.getOperationResultIfFinished(mExistenceCheckOpId);\r
+ if (result != null) {\r
+ //Log_OC.wtf(TAG, "found result of operation finished while rotating");\r
+ if (AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(\r
+ MainApp.getAccountType()).equals(mAuthTokenType)) {\r
+ onSamlBasedFederatedSingleSignOnAuthorizationStart(result);\r
+\r
+ } else {\r
+ onAuthorizationCheckFinish(result);\r
+ }\r
+ }\r
+ }if (mGetUserNameOpId != -1) {\r
+ RemoteOperationResult result = \r
+ mOperationsServiceBinder.getOperationResultIfFinished(mGetUserNameOpId);\r
+ if (result != null) {\r
+ //Log_OC.wtf(TAG, "found result of operation finished while rotating");\r
+ onGetUserNameFinish(result);\r
+ }\r
+ \r
+ } \r
+ \r
+ }\r
+\r
+ \r
+ private void dismissDialog(String dialogTag){\r
+ Fragment frag = getSupportFragmentManager().findFragmentByTag(dialogTag);\r
+ if (frag != null && frag instanceof SherlockDialogFragment) {\r
+ SherlockDialogFragment dialog = (SherlockDialogFragment) frag;\r