OC-3390: Shows message about 'not support authentication' under server address
authormasensio <masensio@solidgear.es>
Wed, 19 Mar 2014 09:07:56 +0000 (10:07 +0100)
committermasensio <masensio@solidgear.es>
Wed, 19 Mar 2014 09:07:56 +0000 (10:07 +0100)
res/values/strings.xml
src/com/owncloud/android/authentication/AuthenticatorActivity.java

index de1c969..84d9f0c 100644 (file)
        <string name="copy_link">Copy link</string>     
        <string name="clipboard_text_copied">Copied to clipboard</string>
        
-       <string name="common_alert_title">Attention!</string>
 </resources>
index 16ce755..33ddbf7 100644 (file)
@@ -897,6 +897,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
             mDiscoveredVersion = operation.getDiscoveredVersion();\r
             mHostBaseUrl = normalizeUrl(mHostUrlInput.getText().toString());\r
             \r
+            // Refresh server status, but don't show it\r
+            updateServerStatusIconAndText(result);\r
+            \r
             /// update status icon and text\r
             if (mServerIsValid) {\r
                 hideRefreshButton();\r
@@ -905,9 +908,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
                 tryEmptyAuthorization();\r
             } else {\r
                 showRefreshButton();\r
+                // Show server status\r
+                showServerStatus();\r
             }\r
-            updateServerStatusIconAndText(result);\r
-            showServerStatus();\r
 \r
             /// very special case (TODO: move to a common place for all the remote operations)\r
             if (result.getCode() == ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED) {\r
@@ -1140,12 +1143,12 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
 \r
 \r
     private void updateStatusIconFailUserName(){\r
-        mAuthStatusIcon = android.R.drawable.ic_secure;\r
+        mAuthStatusIcon = R.drawable.common_error;\r
         mAuthStatusText = R.string.auth_fail_get_user_name;\r
     }\r
     \r
     private void updateServerStatusIconNoRegularAuth(){\r
-        mServerStatusIcon = android.R.drawable.ic_secure;\r
+        mServerStatusIcon = R.drawable.common_error;\r
         mServerStatusText = R.string.auth_unsupported_auth_method;\r
     }\r
     \r
@@ -1206,7 +1209,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
                 mOkButton.setEnabled(false);\r
                 mTryEmptyAuthorization = false;\r
                 mServerIsValid = false;\r
-                //show an alert message\r
+                //show an alert message ( Server Status )\r
                 updateServerStatusIconNoRegularAuth();\r
                 showServerStatus();\r
                 \r
@@ -1231,7 +1234,10 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
             if (mTryEmptyAuthorization) {\r
                 mTryEmptyAuthorization = false;\r
                 mOkButton.setEnabled(true);\r
-\r
+                \r
+                // Show server status\r
+                showServerStatus();\r
+                \r
             } else if (result.isServerFail() || result.isException()) {\r
                 /// if server fail or exception in authorization, the UI is updated as when a server check failed\r
                 mServerIsChecked = true;\r