mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
* lint issue #171 - added Locale.getDefault()
* lint issue #171 - added Locale.getDefault()
* lint issue #171 - added %d
* lint issue #171 - Changed version
* lint issue #171 - added singleLine="true"
* lint issue #171 - changed commit to apply
* lint issue #171 - added Locale.getDefault()
* lint issue #171 - added Locale.getDefault()
* Codacy issues #778 - nested if loop
* Codacy issues #778 - nested if loop
* Revert "lint issue #171 - added %d" since we dont edit translated string files
This reverts commit e4917cddcf.
This commit is contained in:
parent
f80311d9f6
commit
3c2cc26d3b
9 changed files with 17 additions and 15 deletions
|
|
@ -29,6 +29,7 @@ import android.widget.EditText;
|
|||
import android.widget.TextView;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
|
@ -267,18 +268,18 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
if (result.equals("NetworkFailure")) {
|
||||
// Matches NetworkFailure which is created by the doInBackground method
|
||||
showMessageAndCancelDialog(R.string.login_failed_network);
|
||||
} else if (result.toLowerCase().contains("nosuchuser".toLowerCase()) || result.toLowerCase().contains("noname".toLowerCase())) {
|
||||
} else if (result.toLowerCase(Locale.getDefault()).contains("nosuchuser".toLowerCase()) || result.toLowerCase().contains("noname".toLowerCase())) {
|
||||
// Matches nosuchuser, nosuchusershort, noname
|
||||
showMessageAndCancelDialog(R.string.login_failed_username);
|
||||
emptySensitiveEditFields();
|
||||
} else if (result.toLowerCase().contains("wrongpassword".toLowerCase())) {
|
||||
} else if (result.toLowerCase(Locale.getDefault()).contains("wrongpassword".toLowerCase())) {
|
||||
// Matches wrongpassword, wrongpasswordempty
|
||||
showMessageAndCancelDialog(R.string.login_failed_password);
|
||||
emptySensitiveEditFields();
|
||||
} else if (result.toLowerCase().contains("throttle".toLowerCase())) {
|
||||
} else if (result.toLowerCase(Locale.getDefault()).contains("throttle".toLowerCase())) {
|
||||
// Matches unknown throttle error codes
|
||||
showMessageAndCancelDialog(R.string.login_failed_throttled);
|
||||
} else if (result.toLowerCase().contains("userblocked".toLowerCase())) {
|
||||
} else if (result.toLowerCase(Locale.getDefault()).contains("userblocked".toLowerCase())) {
|
||||
// Matches login-userblocked
|
||||
showMessageAndCancelDialog(R.string.login_failed_blocked);
|
||||
} else if (result.equals("2FA")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue