@@ -317,22 +317,26 @@ protected void onCreate(Bundle savedInstanceState) {
317
317
mIsFirstAuthAttempt = savedInstanceState .getBoolean (KEY_AUTH_IS_FIRST_ATTEMPT_TAG );
318
318
}
319
319
320
- boolean webViewLoginMethod ;
320
+ boolean webViewLoginMethod = false ;
321
321
String webloginUrl = null ;
322
322
323
323
if (MainApp .isClientBrandedPlus ()) {
324
324
RestrictionsManager restrictionsManager = (RestrictionsManager ) getSystemService (Context .RESTRICTIONS_SERVICE );
325
325
AppConfigManager appConfigManager = new AppConfigManager (this , restrictionsManager .getApplicationRestrictions ());
326
- webloginUrl = appConfigManager .getBaseUrl (MainApp .isClientBrandedPlus ());
326
+
327
+ if (!TextUtils .isEmpty (appConfigManager .getBaseUrl (MainApp .isClientBrandedPlus ()))) {
328
+ webloginUrl = appConfigManager .getBaseUrl (MainApp .isClientBrandedPlus ()) + WEB_LOGIN ;
329
+ }
327
330
}
328
331
329
- if (webloginUrl != null ) {
332
+ if (! TextUtils . isEmpty ( webloginUrl ) ) {
330
333
webViewLoginMethod = true ;
331
334
} else if (getIntent ().getBooleanExtra (EXTRA_USE_PROVIDER_AS_WEBLOGIN , false )) {
332
335
webViewLoginMethod = true ;
333
336
webloginUrl = getString (R .string .provider_registration_server );
334
- } else {
335
- webViewLoginMethod = !TextUtils .isEmpty (getResources ().getString (R .string .webview_login_url ));
337
+ } else if (!TextUtils .isEmpty (getResources ().getString (R .string .webview_login_url ))) {
338
+ webViewLoginMethod = true ;
339
+ webloginUrl = getResources ().getString (R .string .webview_login_url );
336
340
showWebViewLoginUrl = getResources ().getBoolean (R .bool .show_server_url_input );
337
341
}
338
342
0 commit comments