fix conditions for multi account

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-11-05 15:18:08 +01:00 committed by Alper Öztürk
parent 8746e903cf
commit d5b1891439
2 changed files with 3 additions and 3 deletions

View file

@ -810,7 +810,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
Uri data = intent.getData();
if (data != null && data.toString().startsWith(getString(R.string.login_data_own_scheme))) {
if (!MDMConfig.INSTANCE.multiAccountSupport(this) ||
if (!MDMConfig.INSTANCE.multiAccountSupport(this) &&
accountManager.getAccounts().length == 1) {
Toast.makeText(this, R.string.no_mutliple_accounts_allowed, Toast.LENGTH_LONG).show();
finish();
@ -1531,7 +1531,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
return;
}
if (!MDMConfig.INSTANCE.multiAccountSupport(this) ||
if (!MDMConfig.INSTANCE.multiAccountSupport(this) &&
accountManager.getAccounts().length == 1) {
Toast.makeText(this, R.string.no_mutliple_accounts_allowed, Toast.LENGTH_LONG).show();
} else {

View file

@ -18,7 +18,7 @@ class DeepLinkLoginActivity : AuthenticatorActivity(), Injectable {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!MDMConfig.multiAccountSupport(this) || accountManager.accounts.size == 1) {
if (!MDMConfig.multiAccountSupport(this) && accountManager.accounts.size == 1) {
Toast.makeText(this, R.string.no_mutliple_accounts_allowed, Toast.LENGTH_LONG).show()
return
}