|
12 | 12 | * @author Jorge Aguado Recio |
13 | 13 | * |
14 | 14 | * Copyright (C) 2012 Bartek Przybylski |
15 | | - * Copyright (C) 2024 ownCloud GmbH. |
| 15 | + * Copyright (C) 2025 ownCloud GmbH. |
16 | 16 | * |
17 | 17 | * This program is free software: you can redistribute it and/or modify |
18 | 18 | * it under the terms of the GNU General Public License version 2, |
@@ -46,6 +46,7 @@ import androidx.core.net.toUri |
46 | 46 | import androidx.core.view.isVisible |
47 | 47 | import androidx.core.widget.doAfterTextChanged |
48 | 48 | import com.owncloud.android.BuildConfig |
| 49 | +import com.owncloud.android.MainApp |
49 | 50 | import com.owncloud.android.MainApp.Companion.accountType |
50 | 51 | import com.owncloud.android.R |
51 | 52 | import com.owncloud.android.data.authentication.KEY_USER_ID |
@@ -372,13 +373,14 @@ class LoginActivity : AppCompatActivity(), SslUntrustedCertDialog.OnSslUntrusted |
372 | 373 | } |
373 | 374 |
|
374 | 375 | private fun checkServerType(serverInfo: ServerInfo) { |
| 376 | + if (BuildConfig.FLAVOR == MainApp.QA_FLAVOR) { |
| 377 | + handleBasicAuth() |
| 378 | + return |
| 379 | + } |
| 380 | + |
375 | 381 | when (serverInfo) { |
376 | 382 | is ServerInfo.BasicServer -> { |
377 | | - authTokenType = BASIC_TOKEN_TYPE |
378 | | - oidcSupported = false |
379 | | - showOrHideBasicAuthFields(shouldBeVisible = true) |
380 | | - binding.accountUsername.doAfterTextChanged { updateLoginButtonVisibility() } |
381 | | - binding.accountPassword.doAfterTextChanged { updateLoginButtonVisibility() } |
| 383 | + handleBasicAuth() |
382 | 384 | } |
383 | 385 |
|
384 | 386 | is ServerInfo.OAuth2Server -> { |
@@ -416,6 +418,14 @@ class LoginActivity : AppCompatActivity(), SslUntrustedCertDialog.OnSslUntrusted |
416 | 418 | } |
417 | 419 | } |
418 | 420 |
|
| 421 | + private fun handleBasicAuth() { |
| 422 | + authTokenType = BASIC_TOKEN_TYPE |
| 423 | + oidcSupported = false |
| 424 | + showOrHideBasicAuthFields(shouldBeVisible = true) |
| 425 | + binding.accountUsername.doAfterTextChanged { updateLoginButtonVisibility() } |
| 426 | + binding.accountPassword.doAfterTextChanged { updateLoginButtonVisibility() } |
| 427 | + } |
| 428 | + |
419 | 429 | private fun getServerInfoIsLoading() { |
420 | 430 | binding.serverStatusText.run { |
421 | 431 | text = getString(R.string.auth_testing_connection) |
|
0 commit comments