From: masensio Date: Tue, 11 Mar 2014 12:56:41 +0000 (+0100) Subject: OC-3242: Add new error message for fail in GetUserName X-Git-Tag: oc-android-1.5.5~17^2~2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/564bbf7bb832881ee56fe90ea520b5f4becf491d OC-3242: Add new error message for fail in GetUserName --- diff --git a/owncloud-android-library b/owncloud-android-library index 1dbc9a12..a610dc3c 160000 --- a/owncloud-android-library +++ b/owncloud-android-library @@ -1 +1 @@ -Subproject commit 1dbc9a121e8818d0202d3aaec31bce1335ee428b +Subproject commit a610dc3cd3eb9b1ddbf899476ea50d08e1674ca7 diff --git a/res/values/strings.xml b/res/values/strings.xml index 60e4ecab..c8f370e4 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -166,6 +166,7 @@ Connecting to authentication server… The server does not support this authentication method %1$s does not support multiple accounts + Your server is not returning a correct user id, contact with your admin please Keep file up to date Rename diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index b59ac6e7..e604a954 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -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.