OC-1194: Adapt Sync Process using etag
[pub/Android/ownCloud.git] / src / com / owncloud / android / authentication / AuthenticatorActivity.java
index 18226a5..76041c1 100644 (file)
@@ -161,6 +161,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         /// set view and get references to view elements\r
         setContentView(R.layout.account_setup);\r
         mHostUrlInput = (EditText) findViewById(R.id.hostUrlInput);\r
+        mHostUrlInput.setText(getString(R.string.server_url));  // valid although R.string.server_url is an empty string\r
         mUsernameInput = (EditText) findViewById(R.id.account_username);\r
         mPasswordInput = (EditText) findViewById(R.id.account_password);\r
         mOAuthAuthEndpointText = (TextView)findViewById(R.id.oAuthEntryPoint_1);\r
@@ -190,9 +191,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         // URL input configuration applied\r
         if (!mHostUrlInputEnabled)\r
         {\r
-            mHostUrlInput.setText(getString(R.string.server_url));\r
             findViewById(R.id.hostUrlFrame).setVisibility(View.GONE);\r
-            \r
             mRefreshButton = findViewById(R.id.centeredRefreshButton);\r
 \r
         } else {\r
@@ -432,9 +431,6 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         if (view.getId() == R.id.hostUrlInput) {   \r
             if (!hasFocus) {\r
                 onUrlInputFocusLost((TextView) view);\r
-                if (!mServerIsValid) {\r
-                    showRefreshButton();\r
-                }\r
             }\r
             else {\r
                 hideRefreshButton();\r
@@ -462,6 +458,9 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
             checkOcServer();\r
         } else {\r
             mOkButton.setEnabled(mServerIsValid);\r
+            if (!mServerIsValid) {\r
+                showRefreshButton();\r
+            }\r
         }\r
     }\r
 \r