зеркало из https://github.com/nextcloud/android.git
mdm only needs to provide server address
fallback to normal login Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
Родитель
08afce2e73
Коммит
af9a63a29e
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче