import com.owncloud.android.ui.dialog.SamlWebViewDialog;\r
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;\r
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;\r
+import com.owncloud.android.utils.DisplayUtils;\r
\r
/**\r
* This Activity is used to add an ownCloud account to the App\r
\r
/// step 2 - set properties of UI elements (text, visibility, enabled...)\r
mHostUrlInput = (EditText) findViewById(R.id.hostUrlInput);\r
- mHostUrlInput.setText(mServerInfo.mBaseUrl);\r
+ // Convert IDN to Unicode\r
+ mHostUrlInput.setText(DisplayUtils.convertIdn(mServerInfo.mBaseUrl, false));\r
if (mAction != ACTION_CREATE) {\r
/// lock things that should not change\r
mHostUrlInput.setEnabled(false);\r
\r
if (mOperationsServiceBinder != null) {\r
//Log_OC.wtf(TAG, "getting access token..." );\r
- mWaitingForOpId = mOperationsServiceBinder.newOperation(getServerInfoIntent);\r
+ mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getServerInfoIntent);\r
}\r
}\r
\r
showRefreshButton(false);\r
\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
normalizeUrlSuffix(uri)\r
);\r
if (mOperationsServiceBinder != null) {\r
- mWaitingForOpId = mOperationsServiceBinder.newOperation(getServerInfoIntent);\r
+ mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getServerInfoIntent);\r
} else {\r
Log_OC.wtf(TAG, "Server check tried with OperationService unbound!" );\r
}\r
\r
if (mOperationsServiceBinder != null) {\r
//Log_OC.wtf(TAG, "starting existenceCheckRemoteOperation..." );\r
- mWaitingForOpId = mOperationsServiceBinder.newOperation(existenceCheckIntent);\r
+ mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(existenceCheckIntent);\r
}\r
}\r
\r
dismissDialog(WAIT_DIALOG_TAG);\r
if (result.isIdPRedirection()) {
- String url = result.getRedirectedLocation();\r
String targetUrl = mServerInfo.mBaseUrl \r
+ AccountUtils.getWebdavPath(mServerInfo.mVersion, mAuthTokenType);\r
\r
// Show dialog\r
- SamlWebViewDialog dialog = SamlWebViewDialog.newInstance(url, targetUrl); \r
+ SamlWebViewDialog dialog = SamlWebViewDialog.newInstance(targetUrl, targetUrl); \r
dialog.show(getSupportFragmentManager(), SAML_DIALOG_TAG);\r
\r
mAuthStatusIcon = 0;\r
\r
if (mOperationsServiceBinder != null) {\r
//Log_OC.wtf(TAG, "starting getRemoteUserNameOperation..." );\r
- mWaitingForOpId = mOperationsServiceBinder.newOperation(getUserNameIntent);\r
+ mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getUserNameIntent);\r
}\r
}\r
\r