Fixed problem after erasing URL in login view and changing to next field
authorDavid A. Velasco <dvelasco@solidgear.es>
Thu, 16 May 2013 10:48:13 +0000 (12:48 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Thu, 16 May 2013 10:48:13 +0000 (12:48 +0200)
src/com/owncloud/android/authentication/AuthenticatorActivity.java

index 1487aee..07c9d53 100644 (file)
@@ -414,15 +414,15 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
 \r
     private void checkOcServer() {\r
         String uri = mHostUrlInput.getText().toString().trim();\r
+        mServerCheckedAndValid = false;\r
+        mOkButton.setEnabled(false);\r
+        mDiscoveredVersion = null;\r
         if (uri.length() != 0) {\r
-            mServerCheckedAndValid = false;\r
-            mOkButton.setEnabled(false);\r
             mServerStatusText = R.string.auth_testing_connection;\r
             mServerStatusIcon = R.drawable.progress_small;\r
             showServerStatus();\r
             mOcServerChkOperation = new  OwnCloudServerCheckOperation(uri, this);\r
             WebdavClient client = OwnCloudClientUtils.createOwnCloudClient(Uri.parse(uri), this);\r
-            mDiscoveredVersion = null;\r
             mOperationThread = mOcServerChkOperation.execute(client, this, mHandler);\r
         } else {\r
             mHostUrlInput.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);\r
@@ -1028,7 +1028,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
      * @param view      Refresh 'button'\r
      */\r
     public void onRefreshClick(View view) {\r
-        onFocusChange(mHostUrlInput, false);\r
+        checkOcServer();\r
     }\r
     \r
     \r