findViewById(R.id.hostUrlFrame).setVisibility(View.GONE);\r
mRefreshButton = findViewById(R.id.centeredRefreshButton);\r
}\r
findViewById(R.id.hostUrlFrame).setVisibility(View.GONE);\r
mRefreshButton = findViewById(R.id.centeredRefreshButton);\r
}\r
mWaitingForOpId > Integer.MAX_VALUE);\r
mServerStatusView = (TextView) findViewById(R.id.server_status_text);\r
showServerStatus();\r
mWaitingForOpId > Integer.MAX_VALUE);\r
mServerStatusView = (TextView) findViewById(R.id.server_status_text);\r
showServerStatus();\r
mOkButton.setEnabled(false);\r
mServerInfo = new GetServerInfoOperation.ServerInfo();\r
showRefreshButton(false);\r
mOkButton.setEnabled(false);\r
mServerInfo = new GetServerInfoOperation.ServerInfo();\r
showRefreshButton(false);\r
if (uri.length() != 0) {\r
// Handle internationalized domain names\r
uri = DisplayUtils.convertIdn(uri, true);\r
if (uri.length() != 0) {\r
// Handle internationalized domain names\r
uri = DisplayUtils.convertIdn(uri, true);\r
mServerStatusText = R.string.auth_testing_connection;\r
mServerStatusIcon = R.drawable.progress_small;\r
showServerStatus();\r
mServerStatusText = R.string.auth_testing_connection;\r
mServerStatusIcon = R.drawable.progress_small;\r
showServerStatus();\r
Intent getServerInfoIntent = new Intent();\r
getServerInfoIntent.setAction(OperationsService.ACTION_GET_SERVER_INFO);\r
getServerInfoIntent.putExtra(\r
Intent getServerInfoIntent = new Intent();\r
getServerInfoIntent.setAction(OperationsService.ACTION_GET_SERVER_INFO);\r
getServerInfoIntent.putExtra(\r
- OperationsService.EXTRA_SERVER_URL, \r
- normalizeUrlSuffix(uri)\r
+ OperationsService.EXTRA_SERVER_URL,\r
+ normalizeUrlSuffix(uri)\r
);\r
if (mOperationsServiceBinder != null) {\r
mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getServerInfoIntent);\r
);\r
if (mOperationsServiceBinder != null) {\r
mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getServerInfoIntent);\r
Log_OC.d(TAG, "Successful access - time to save the account");\r
\r
boolean success = false;\r
Log_OC.d(TAG, "Successful access - time to save the account");\r
\r
boolean success = false;\r
/// create and save new ownCloud account\r
boolean isOAuth = AccountTypeUtils.\r
getAuthTokenTypeAccessToken(MainApp.getAccountType()).equals(mAuthTokenType);\r
boolean isSaml = AccountTypeUtils.\r
getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType()).equals(mAuthTokenType);\r
\r
/// create and save new ownCloud account\r
boolean isOAuth = AccountTypeUtils.\r
getAuthTokenTypeAccessToken(MainApp.getAccountType()).equals(mAuthTokenType);\r
boolean isSaml = AccountTypeUtils.\r
getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType()).equals(mAuthTokenType);\r
\r
Uri uri = Uri.parse(mServerInfo.mBaseUrl);\r
String username = mUsernameInput.getText().toString().trim();\r
if (isOAuth) {\r
Uri uri = Uri.parse(mServerInfo.mBaseUrl);\r
String username = mUsernameInput.getText().toString().trim();\r
if (isOAuth) {\r
+ // include account version with the new account\r
+ mAccountMgr.setUserData(\r
+ mAccount,\r
+ Constants.KEY_OC_ACCOUNT_VERSION,\r
+ Integer.toString(AccountUtils.ACCOUNT_VERSION)\r
+ );\r
+\r
/// add the new account as default in preferences, if there is none already\r
Account defaultAccount = AccountUtils.getCurrentOwnCloudAccount(this);\r
if (defaultAccount == null) {\r
/// add the new account as default in preferences, if there is none already\r
Account defaultAccount = AccountUtils.getCurrentOwnCloudAccount(this);\r
if (defaultAccount == null) {\r
/// add user data to the new account; TODO probably can be done in the last parameter \r
// addAccountExplicitly, or in KEY_USERDATA\r
mAccountMgr.setUserData(\r
/// add user data to the new account; TODO probably can be done in the last parameter \r
// addAccountExplicitly, or in KEY_USERDATA\r
mAccountMgr.setUserData(\r
);\r
mAccountMgr.setUserData(\r
mAccount, Constants.KEY_OC_BASE_URL, mServerInfo.mBaseUrl\r
);\r
mAccountMgr.setUserData(\r
mAccount, Constants.KEY_OC_BASE_URL, mServerInfo.mBaseUrl\r