OC-3242: Add new error message for fail in GetUserName. No changes in library reference
[pub/Android/ownCloud.git] / src / com / owncloud / android / authentication / AuthenticatorActivity.java
index b59ac6e..e604a95 100644 (file)
@@ -807,6 +807,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
     }\r
 \r
     private void onGetUserNameFinish(GetRemoteUserNameOperation operation, RemoteOperationResult result) {\r
     }\r
 \r
     private void onGetUserNameFinish(GetRemoteUserNameOperation operation, RemoteOperationResult result) {\r
+        \r
         if (result.isSuccess()) {\r
             boolean success = false;\r
             String username = operation.getUserName();\r
         if (result.isSuccess()) {\r
             boolean success = false;\r
             String username = operation.getUserName();\r
@@ -831,7 +832,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
             if (success)\r
                 finish();\r
         } else {\r
             if (success)\r
                 finish();\r
         } else {\r
-            updateAuthStatusIconAndText(result);\r
+            updateStatusIconFailUserName();\r
             showAuthStatus();\r
             Log_OC.e(TAG, "Access to user name failed: " + result.getLogMessage());\r
         }\r
             showAuthStatus();\r
             Log_OC.e(TAG, "Access to user name failed: " + result.getLogMessage());\r
         }\r
@@ -1104,6 +1105,11 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
     }\r
 \r
 \r
     }\r
 \r
 \r
+    private void updateStatusIconFailUserName(){\r
+        mAuthStatusIcon = android.R.drawable.ic_secure;\r
+        mAuthStatusText = R.string.auth_fail_get_user_name;\r
+    }\r
+    \r
     /**\r
      * Processes the result of the request for and access token send \r
      * to an OAuth authorization server.\r
     /**\r
      * Processes the result of the request for and access token send \r
      * to an OAuth authorization server.\r