Always flip the first character of username to be uppercase

This commit is contained in:
YuviPanda 2012-11-03 04:07:41 +05:30
parent b939ec2137
commit f8c9dba049

View file

@ -112,12 +112,14 @@ public class LoginActivity extends AccountAuthenticatorActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
String username = usernameEdit.getText().toString(); String username = usernameEdit.getText().toString();
String password = passwordEdit.getText().toString(); // Because Mediawiki is upercase-first-char-then-case-sensitive :)
String canonicalUsername = username.substring(0,1).toUpperCase() + username.substring(1);
String password = passwordEdit.getText().toString();
Log.d("Commons", "Login to start!"); Log.d("Commons", "Login to start!");
LoginTask task = new LoginTask(that); LoginTask task = new LoginTask(that);
task.execute(username, password); task.execute(canonicalUsername, password);
} }
}); });
} }