X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/2fad1e1a996c1f6058445ca398a74743b0e93023..ec6b9d7c70deb50152bfab5cb5f25c9a2dde28e7:/src/com/owncloud/android/authentication/AuthenticatorActivity.java diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index 97dcfde8..8d7182d7 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -85,6 +85,7 @@ import com.owncloud.android.ui.dialog.IndeterminateProgressDialog; import com.owncloud.android.ui.dialog.SamlWebViewDialog; import com.owncloud.android.ui.dialog.SslUntrustedCertDialog; import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener; +import com.owncloud.android.utils.DisplayUtils; /** * This Activity is used to add an ownCloud account to the App @@ -356,7 +357,8 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { /// step 2 - set properties of UI elements (text, visibility, enabled...) mHostUrlInput = (EditText) findViewById(R.id.hostUrlInput); - mHostUrlInput.setText(mServerInfo.mBaseUrl); + // Convert IDN to Unicode + mHostUrlInput.setText(DisplayUtils.convertIdn(mServerInfo.mBaseUrl, false)); if (mAction != ACTION_CREATE) { /// lock things that should not change mHostUrlInput.setEnabled(false); @@ -681,7 +683,7 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { if (mOperationsServiceBinder != null) { //Log_OC.wtf(TAG, "getting access token..." ); - mWaitingForOpId = mOperationsServiceBinder.newOperation(getServerInfoIntent); + mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getServerInfoIntent); } } @@ -737,6 +739,8 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { showRefreshButton(false); if (uri.length() != 0) { + // Handle internationalized domain names + uri = DisplayUtils.convertIdn(uri, true); mServerStatusText = R.string.auth_testing_connection; mServerStatusIcon = R.drawable.progress_small; showServerStatus(); @@ -748,7 +752,7 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { normalizeUrlSuffix(uri) ); if (mOperationsServiceBinder != null) { - mWaitingForOpId = mOperationsServiceBinder.newOperation(getServerInfoIntent); + mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getServerInfoIntent); } else { Log_OC.wtf(TAG, "Server check tried with OperationService unbound!" ); } @@ -884,7 +888,7 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { if (mOperationsServiceBinder != null) { //Log_OC.wtf(TAG, "starting existenceCheckRemoteOperation..." ); - mWaitingForOpId = mOperationsServiceBinder.newOperation(existenceCheckIntent); + mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(existenceCheckIntent); } } @@ -1016,12 +1020,11 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { dismissDialog(WAIT_DIALOG_TAG); if (result.isIdPRedirection()) { - String url = result.getRedirectedLocation(); String targetUrl = mServerInfo.mBaseUrl + AccountUtils.getWebdavPath(mServerInfo.mVersion, mAuthTokenType); // Show dialog - SamlWebViewDialog dialog = SamlWebViewDialog.newInstance(url, targetUrl); + SamlWebViewDialog dialog = SamlWebViewDialog.newInstance(targetUrl, targetUrl); dialog.show(getSupportFragmentManager(), SAML_DIALOG_TAG); mAuthStatusIcon = 0; @@ -1700,7 +1703,7 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { if (mOperationsServiceBinder != null) { //Log_OC.wtf(TAG, "starting getRemoteUserNameOperation..." ); - mWaitingForOpId = mOperationsServiceBinder.newOperation(getUserNameIntent); + mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getUserNameIntent); } }