Changes from comments in PR#443
authormasensio <masensio@solidgear.es>
Thu, 20 Mar 2014 15:15:59 +0000 (16:15 +0100)
committermasensio <masensio@solidgear.es>
Thu, 20 Mar 2014 15:15:59 +0000 (16:15 +0100)
res/values/strings.xml
src/com/owncloud/android/authentication/AuthenticatorActivity.java

index 81d2581..2223c6e 100644 (file)
        <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="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="auth_unsupported_basic_auth">Can not authenticate against this server</string>
+       <string name="auth_can_not_auth_against_server">Can not authenticate against this server</string>
     
     <string name="fd_keep_in_sync">Keep file up to date</string>
     <string name="common_rename">Rename</string>
     
     <string name="fd_keep_in_sync">Keep file up to date</string>
     <string name="common_rename">Rename</string>
index 60bec63..178e164 100644 (file)
@@ -176,7 +176,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
 \r
     public static String DIALOG_UNTRUSTED_CERT = "DIALOG_UNTRUSTED_CERT";\r
     \r
 \r
     public static String DIALOG_UNTRUSTED_CERT = "DIALOG_UNTRUSTED_CERT";\r
     \r
-    private boolean mTryEmptyAuthorization = false;\r
+    private boolean mDetectAuthorizationMethod = false;\r
 \r
 \r
     /**\r
 \r
 \r
     /**\r
@@ -905,7 +905,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
                 hideRefreshButton();\r
                 // Try to create an account with user and pass "", to know if it is a regular server\r
                 // Update connect button in the answer of this method\r
                 hideRefreshButton();\r
                 // Try to create an account with user and pass "", to know if it is a regular server\r
                 // Update connect button in the answer of this method\r
-                tryEmptyAuthorization();\r
+                detectAuthorizationMethod();\r
             } else {\r
                 showRefreshButton();\r
                 // Show server status\r
             } else {\r
                 showRefreshButton();\r
                 // Show server status\r
@@ -926,8 +926,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
     /**\r
      *  Try to access with  user/pass ""/"", to know if it is a regular server\r
      */\r
     /**\r
      *  Try to access with  user/pass ""/"", to know if it is a regular server\r
      */\r
-    private void tryEmptyAuthorization() {\r
-        mTryEmptyAuthorization = true;\r
+    private void detectAuthorizationMethod() {\r
+        mDetectAuthorizationMethod = true;\r
         \r
         Log_OC.d(TAG, "Trying empty authorization to detect authentication method");\r
         \r
         \r
         Log_OC.d(TAG, "Trying empty authorization to detect authentication method");\r
         \r
@@ -1149,7 +1149,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
     \r
     private void updateServerStatusIconNoRegularAuth(){\r
         mServerStatusIcon = R.drawable.common_error;\r
     \r
     private void updateServerStatusIconNoRegularAuth(){\r
         mServerStatusIcon = R.drawable.common_error;\r
-        mServerStatusText = R.string.auth_unsupported_basic_auth;\r
+        mServerStatusText = R.string.auth_can_not_auth_against_server;\r
     }\r
     \r
     /**\r
     }\r
     \r
     /**\r
@@ -1203,11 +1203,10 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         }\r
         \r
         if (result.isSuccess()) {\r
         }\r
         \r
         if (result.isSuccess()) {\r
-            \r
-            if (mTryEmptyAuthorization) {\r
-                //allow or not the user try to access the server\r
+            //allow or not the user try to access the server\r
+            if (mDetectAuthorizationMethod) {\r
                 mOkButton.setEnabled(false);\r
                 mOkButton.setEnabled(false);\r
-                mTryEmptyAuthorization = false;\r
+                mDetectAuthorizationMethod = false;\r
                 mServerIsValid = false;\r
                 //show an alert message ( Server Status )\r
                 updateServerStatusIconNoRegularAuth();\r
                 mServerIsValid = false;\r
                 //show an alert message ( Server Status )\r
                 updateServerStatusIconNoRegularAuth();\r
@@ -1231,8 +1230,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
             }\r
 \r
         } else {\r
             }\r
 \r
         } else {\r
-            if (mTryEmptyAuthorization) {\r
-                mTryEmptyAuthorization = false;\r
+            if (mDetectAuthorizationMethod) {\r
+                mDetectAuthorizationMethod = false;\r
                 mOkButton.setEnabled(true);\r
                 \r
                 // Show server status\r
                 mOkButton.setEnabled(true);\r
                 \r
                 // Show server status\r