浏览代码

Fixed 'connect' button disabling with change of orientation when focus is in the URL field

David A. Velasco 12 年之前
父节点
当前提交
a4bd86cf14
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/com/owncloud/android/authentication/AuthenticatorActivity.java

+ 4 - 2
src/com/owncloud/android/authentication/AuthenticatorActivity.java

@@ -269,7 +269,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
 
             @Override
             public void afterTextChanged(Editable s) {
-                mOkButton.setEnabled(false);
+                if (!mHostBaseUrl.equals(normalizeUrl(mHostUrlInput.getText().toString()))) {
+                    mOkButton.setEnabled(false);
+                }
             }
 
             @Override
@@ -640,7 +642,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
                 url = url.substring(0, url.length() - 1);
             }
         }
-        return url;
+        return (url != null ? url : "");
     }
 
     /**