private static final String KEY_AUTH_STATUS_TEXT = "AUTH_STATUS_TEXT";\r
private static final String KEY_AUTH_STATUS_ICON = "AUTH_STATUS_ICON";\r
private static final String KEY_SERVER_AUTH_METHOD = "SERVER_AUTH_METHOD";\r
private static final String KEY_AUTH_STATUS_TEXT = "AUTH_STATUS_TEXT";\r
private static final String KEY_AUTH_STATUS_ICON = "AUTH_STATUS_ICON";\r
private static final String KEY_SERVER_AUTH_METHOD = "SERVER_AUTH_METHOD";\r
private static final String KEY_AUTH_TOKEN = "AUTH_TOKEN";\r
\r
private static final String AUTH_ON = "on";\r
private static final String KEY_AUTH_TOKEN = "AUTH_TOKEN";\r
\r
private static final String AUTH_ON = "on";\r
\r
private GetServerInfoOperation.ServerInfo mServerInfo = \r
new GetServerInfoOperation.ServerInfo();\r
\r
private GetServerInfoOperation.ServerInfo mServerInfo = \r
new GetServerInfoOperation.ServerInfo();\r
\r
/// Identifier of operation in progress which result shouldn't be lost \r
private long mWaitingForOpId = Long.MAX_VALUE;\r
\r
/// Identifier of operation in progress which result shouldn't be lost \r
private long mWaitingForOpId = Long.MAX_VALUE;\r
/// initialize block to be moved to single Fragment to check server and get info about it \r
initServerPreFragment(savedInstanceState);\r
\r
/// initialize block to be moved to single Fragment to retrieve and validate credentials \r
initAuthorizationPreFragment(savedInstanceState);\r
\r
/// initialize block to be moved to single Fragment to check server and get info about it \r
initServerPreFragment(savedInstanceState);\r
\r
/// initialize block to be moved to single Fragment to retrieve and validate credentials \r
initAuthorizationPreFragment(savedInstanceState);\r
\r
- /// step 4 - automatic actions to start\r
- if (savedInstanceState == null) {\r
- if (mAction != ACTION_CREATE || !isUrlInputAllowed) {\r
- checkOcServer(); \r
- }\r
- }\r
+ /// step 4 - mark automatic check to be started when OperationsService is ready\r
+ mPendingAutoCheck = (savedInstanceState == null && \r
+ (mAction != ACTION_CREATE || !isUrlInputAllowed));\r
mUsernameInput = (EditText) findViewById(R.id.account_username);\r
mPasswordInput = (EditText) findViewById(R.id.account_password);\r
mAuthStatusView = (TextView) findViewById(R.id.auth_status_text); \r
mUsernameInput = (EditText) findViewById(R.id.account_username);\r
mPasswordInput = (EditText) findViewById(R.id.account_password);\r
mAuthStatusView = (TextView) findViewById(R.id.auth_status_text); \r
\r
/// step 1 - load and process relevant inputs (resources, intent, savedInstanceState)\r
String presetUserName = null;\r
\r
/// step 1 - load and process relevant inputs (resources, intent, savedInstanceState)\r
String presetUserName = null;\r
outState.putInt(KEY_AUTH_STATUS_TEXT, mAuthStatusText);\r
outState.putString(KEY_AUTH_TOKEN, mAuthToken);\r
\r
outState.putInt(KEY_AUTH_STATUS_TEXT, mAuthStatusText);\r
outState.putString(KEY_AUTH_TOKEN, mAuthToken);\r
\r
getServerInfoIntent.putExtra(OperationsService.EXTRA_SERVER_URL, uri);\r
getServerInfoIntent.putExtra(OperationsService.EXTRA_AUTH_TOKEN_TYPE, mAuthTokenType);\r
if (mOperationsServiceBinder != null) {\r
getServerInfoIntent.putExtra(OperationsService.EXTRA_SERVER_URL, uri);\r
getServerInfoIntent.putExtra(OperationsService.EXTRA_AUTH_TOKEN_TYPE, mAuthTokenType);\r
if (mOperationsServiceBinder != null) {\r
existenceCheckIntent.putExtra(OperationsService.EXTRA_FOLLOW_REDIRECTS, followRedirects);\r
\r
if (mOperationsServiceBinder != null) {\r
existenceCheckIntent.putExtra(OperationsService.EXTRA_FOLLOW_REDIRECTS, followRedirects);\r
\r
if (mOperationsServiceBinder != null) {\r
onGetOAuthAccessTokenFinish(result);\r
\r
} else if (operation instanceof ExistenceCheckRemoteOperation) {\r
onGetOAuthAccessTokenFinish(result);\r
\r
} else if (operation instanceof ExistenceCheckRemoteOperation) {\r
if (AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType()).equals(mAuthTokenType)) {\r
onSamlBasedFederatedSingleSignOnAuthorizationStart(result);\r
\r
if (AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType()).equals(mAuthTokenType)) {\r
onSamlBasedFederatedSingleSignOnAuthorizationStart(result);\r
\r
getUserNameIntent.putExtra(OperationsService.EXTRA_FOLLOW_REDIRECTS, followRedirects);\r
\r
if (mOperationsServiceBinder != null) {\r
getUserNameIntent.putExtra(OperationsService.EXTRA_FOLLOW_REDIRECTS, followRedirects);\r
\r
if (mOperationsServiceBinder != null) {\r
mOperationsServiceBinder.addOperationListener(AuthenticatorActivity.this, mHandler);\r
if (mWaitingForOpId <= Integer.MAX_VALUE) {\r
mOperationsServiceBinder.dispatchResultIfFinished((int)mWaitingForOpId, this);\r
}\r
mOperationsServiceBinder.addOperationListener(AuthenticatorActivity.this, mHandler);\r
if (mWaitingForOpId <= Integer.MAX_VALUE) {\r
mOperationsServiceBinder.dispatchResultIfFinished((int)mWaitingForOpId, this);\r
}\r
@Override\r
public void onServiceConnected(ComponentName component, IBinder service) {\r
if (component.equals(new ComponentName(AuthenticatorActivity.this, OperationsService.class))) {\r
@Override\r
public void onServiceConnected(ComponentName component, IBinder service) {\r
if (component.equals(new ComponentName(AuthenticatorActivity.this, OperationsService.class))) {\r