projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
65b2da3
)
Show an error message for invalid server url
author
masensio
<masensio@solidgear.es>
Fri, 17 Apr 2015 12:10:41 +0000
(14:10 +0200)
committer
masensio
<masensio@solidgear.es>
Fri, 17 Apr 2015 12:10:41 +0000
(14:10 +0200)
owncloud-android-library
patch
|
blob
|
blame
|
history
src/com/owncloud/android/authentication/AuthenticatorActivity.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/utils/DisplayUtils.java
patch
|
blob
|
blame
|
history
diff --git
a/owncloud-android-library
b/owncloud-android-library
index
9e76138
..
4692c4a
160000
(submodule)
--- a/
owncloud-android-library
+++ b/
owncloud-android-library
@@
-1
+1
@@
-Subproject commit
9e761387a0b406402684571f28c36c2d6d2b6301
+Subproject commit
4692c4aadeba1d741b2b164af480c929ad4c17e9
diff --git
a/src/com/owncloud/android/authentication/AuthenticatorActivity.java
b/src/com/owncloud/android/authentication/AuthenticatorActivity.java
index
1e4e8b4
..
d43df3f
100644
(file)
--- a/
src/com/owncloud/android/authentication/AuthenticatorActivity.java
+++ b/
src/com/owncloud/android/authentication/AuthenticatorActivity.java
@@
-380,7
+380,7
@@
public class AuthenticatorActivity extends AccountAuthenticatorActivity
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
- showRefreshButton(mServerIsChecked && !mServerIsValid &&
\r
+ showRefreshButton(mServerIsChecked && !mServerIsValid &&
\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
@@
-773,10
+773,12
@@
public class AuthenticatorActivity extends AccountAuthenticatorActivity
mOkButton.setEnabled(false);
\r
mServerInfo = new GetServerInfoOperation.ServerInfo();
\r
showRefreshButton(false);
\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
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
mServerStatusText = R.string.auth_testing_connection;
\r
mServerStatusIcon = R.drawable.progress_small;
\r
showServerStatus();
\r
diff --git
a/src/com/owncloud/android/utils/DisplayUtils.java
b/src/com/owncloud/android/utils/DisplayUtils.java
index
905f60b
..
c18a0e4
100644
(file)
--- a/
src/com/owncloud/android/utils/DisplayUtils.java
+++ b/
src/com/owncloud/android/utils/DisplayUtils.java
@@
-266,14
+266,14
@@
public class DisplayUtils {
} else if (url.indexOf("@") != -1) {
\r
hostStart = url.indexOf("@") + "@".length();
\r
}
\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
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
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
return url.substring(0, hostStart) + host + url.substring(hostEnd);
\r
} else {
\r
return url;
\r