mirror of
https://github.com/nextcloud/android.git
synced 2024-11-02 03:36:13 +01:00
mdm only needs to provide server address
fallback to normal login Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
08afce2e73
commit
af9a63a29e
2 changed files with 10 additions and 6 deletions
|
@ -43,4 +43,4 @@
|
|||
</inspection_tool>
|
||||
<inspection_tool class="RedundantSemicolon" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
</component>
|
||||
|
|
|
@ -317,22 +317,26 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|||
mIsFirstAuthAttempt = savedInstanceState.getBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG);
|
||||
}
|
||||
|
||||
boolean webViewLoginMethod;
|
||||
boolean webViewLoginMethod = false;
|
||||
String webloginUrl = null;
|
||||
|
||||
if (MainApp.isClientBrandedPlus()) {
|
||||
RestrictionsManager restrictionsManager = (RestrictionsManager) getSystemService(Context.RESTRICTIONS_SERVICE);
|
||||
AppConfigManager appConfigManager = new AppConfigManager(this, restrictionsManager.getApplicationRestrictions());
|
||||
webloginUrl = appConfigManager.getBaseUrl(MainApp.isClientBrandedPlus());
|
||||
|
||||
if (!TextUtils.isEmpty(appConfigManager.getBaseUrl(MainApp.isClientBrandedPlus()))) {
|
||||
webloginUrl = appConfigManager.getBaseUrl(MainApp.isClientBrandedPlus()) + WEB_LOGIN;
|
||||
}
|
||||
}
|
||||
|
||||
if (webloginUrl != null) {
|
||||
if (!TextUtils.isEmpty(webloginUrl)) {
|
||||
webViewLoginMethod = true;
|
||||
} else if (getIntent().getBooleanExtra(EXTRA_USE_PROVIDER_AS_WEBLOGIN, false)) {
|
||||
webViewLoginMethod = true;
|
||||
webloginUrl = getString(R.string.provider_registration_server);
|
||||
} else {
|
||||
webViewLoginMethod = !TextUtils.isEmpty(getResources().getString(R.string.webview_login_url));
|
||||
} else if (!TextUtils.isEmpty(getResources().getString(R.string.webview_login_url))) {
|
||||
webViewLoginMethod = true;
|
||||
webloginUrl = getResources().getString(R.string.webview_login_url);
|
||||
showWebViewLoginUrl = getResources().getBoolean(R.bool.show_server_url_input);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue