Fix bug Shibboleth server does not recognize maintenance mode

# Conflicts:
#	src/com/owncloud/android/authentication/AuthenticatorActivity.java
This commit is contained in:
davigonz 2016-12-29 09:27:04 +01:00 committed by AndyScherzinger
parent 412ce69fcb
commit 33bbbb0be0
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -1252,7 +1252,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
} else {
if (!webViewLoginMethod) {
updateStatusIconFailUserName();
int statusText = result.getCode() == ResultCode.MAINTENANCE_MODE ? R.string.maintenance_mode : R.string.auth_fail_get_user_name;
updateStatusIconFailUserName(statusText);
showAuthStatus();
}
Log_OC.e(TAG, "Access to user name failed: " + result.getLogMessage());
@ -1545,9 +1546,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
private void updateStatusIconFailUserName() {
private void updateStatusIconFailUserName(int statusText){
mAuthStatusIcon = R.drawable.ic_alert;
mAuthStatusText = R.string.auth_fail_get_user_name;
mAuthStatusText = statusText;
}
private void updateServerStatusIconNoRegularAuth() {