Merge pull request #436 from owncloud/add_fail_getUserName_error_message

OC-3242: Add new error message for fail in GetUserName
This commit is contained in:
David A. Velasco 2014-03-11 14:45:47 +01:00
commit a5fc7533aa
2 changed files with 8 additions and 1 deletions

View file

@ -166,6 +166,7 @@
<string name="auth_connecting_auth_server">Connecting to authentication server…</string>
<string name="auth_unsupported_auth_method">The server does not support this authentication method</string>
<string name="auth_unsupported_multiaccount">%1$s does not support multiple accounts</string>
<string name="auth_fail_get_user_name">Your server is not returning a correct user id, contact with your admin please</string>
<string name="fd_keep_in_sync">Keep file up to date</string>
<string name="common_rename">Rename</string>

View file

@ -807,6 +807,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
}
private void onGetUserNameFinish(GetRemoteUserNameOperation operation, RemoteOperationResult result) {
if (result.isSuccess()) {
boolean success = false;
String username = operation.getUserName();
@ -831,7 +832,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
if (success)
finish();
} else {
updateAuthStatusIconAndText(result);
updateStatusIconFailUserName();
showAuthStatus();
Log_OC.e(TAG, "Access to user name failed: " + result.getLogMessage());
}
@ -1104,6 +1105,11 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
}
private void updateStatusIconFailUserName(){
mAuthStatusIcon = android.R.drawable.ic_secure;
mAuthStatusText = R.string.auth_fail_get_user_name;
}
/**
* Processes the result of the request for and access token send
* to an OAuth authorization server.