Filter only '/' character in user input when version of server is 8.1 or later
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / dialog / CredentialsDialogFragment.java
index 1b35057..1b99c7b 100644 (file)
@@ -1,5 +1,7 @@
-/* ownCloud Android client application
- *   Copyright (C) 2014 ownCloud Inc.
+/**
+ *   ownCloud Android client application
+ *
+ *   Copyright (C) 2015 ownCloud Inc.
  *
  *   This program is free software: you can redistribute it and/or modify
  *   it under the terms of the GNU General Public License version 2,
@@ -127,18 +129,18 @@ public class CredentialsDialogFragment extends SherlockDialogFragment
     public void onClick(DialogInterface dialog, int which) {
         if (which == AlertDialog.BUTTON_POSITIVE) { 
 
-            String username = mUsernameET.getText().toString().trim();
-            String password = mPasswordET.getText().toString().trim();
+            String username = mUsernameET.getText().toString();
+            String password = mPasswordET.getText().toString();
 
             // Proceed with the authentication
             mHandler.proceed(username, password);
-            dialog.dismiss();
 
         } else if (which == AlertDialog.BUTTON_NEGATIVE) {
-            dialog.dismiss();
             mWebView.stopLoading();
             ((AuthenticatorActivity)getActivity()).doNegativeAuthenticatioDialogClick();
         }
+
+        dialog.dismiss();
     }