Skip to content

Commit

Permalink
mdm only needs to provide server address
Browse files Browse the repository at this point in the history
fallback to normal login

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
  • Loading branch information
tobiasKaminsky authored and alperozturk96 committed Aug 19, 2024
1 parent 08afce2 commit af9a63a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .idea/inspectionProfiles/ktlint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -317,22 +317,26 @@ protected void onCreate(Bundle savedInstanceState) {
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);
}

Expand Down

0 comments on commit af9a63a

Please sign in to comment.