findViewById(R.id.hostUrlFrame).setVisibility(View.GONE);\r
mRefreshButton = findViewById(R.id.centeredRefreshButton);\r
}\r
- showRefreshButton(mServerIsChecked && !mServerIsValid && \r
+ showRefreshButton(mServerIsChecked && !mServerIsValid &&\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
- \r
+\r
if (uri.length() != 0) {\r
// Handle internationalized domain names\r
- uri = DisplayUtils.convertIdn(uri, true);\r
+ if (!uri.startsWith(".")) {\r
+ uri = DisplayUtils.convertIdn(uri, true);\r
+ }\r
mServerStatusText = R.string.auth_testing_connection;\r
mServerStatusIcon = R.drawable.progress_small;\r
showServerStatus();\r
} else if (url.indexOf("@") != -1) {\r
hostStart = url.indexOf("@") + "@".length();\r
}\r
- \r
+\r
int hostEnd = url.substring(hostStart).indexOf("/");\r
// Handle URL which doesn't have a path (path is implicitly '/')\r
hostEnd = (hostEnd == -1 ? url.length() : hostStart + hostEnd);\r
- \r
+\r
String host = url.substring(hostStart, hostEnd);\r
host = (toASCII ? IDN.toASCII(host) : IDN.toUnicode(host));\r
- \r
+\r
return url.substring(0, hostStart) + host + url.substring(hostEnd);\r
} else {\r
return url;\r