Remove Microsoft integration

This commit is contained in:
MM20
2023-05-14 21:38:00 +02:00
parent 44e029e4af
commit ff61165a34
9 changed files with 1 additions and 133 deletions
@@ -2,7 +2,6 @@ package de.mm20.launcher2.accounts
enum class AccountType {
Google,
Microsoft,
Nextcloud,
Owncloud,
}
@@ -3,7 +3,6 @@ package de.mm20.launcher2.accounts
import android.app.Activity
import android.content.Context
import de.mm20.launcher2.gservices.GoogleApiHelper
import de.mm20.launcher2.msservices.MicrosoftGraphApiHelper
import de.mm20.launcher2.nextcloud.NextcloudApiHelper
import de.mm20.launcher2.owncloud.OwncloudClient
import kotlinx.coroutines.CoroutineScope
@@ -29,7 +28,6 @@ internal class AccountsRepositoryImpl(
private val scope = CoroutineScope(Job() + Dispatchers.Default)
private val googleApiHelper = GoogleApiHelper.getInstance(context)
private val msGraphApiHelper = MicrosoftGraphApiHelper.getInstance(context)
private val nextcloudApiHelper = NextcloudApiHelper(context)
private val owncloudApiHelper = OwncloudClient(context)
@@ -40,11 +38,6 @@ internal class AccountsRepositoryImpl(
googleApiHelper.login(context)
}
}
AccountType.Microsoft -> {
scope.launch {
msGraphApiHelper.login(context)
}
}
AccountType.Nextcloud ->
scope.launch {
nextcloudApiHelper.login(context)
@@ -61,11 +54,6 @@ internal class AccountsRepositoryImpl(
AccountType.Google -> {
googleApiHelper.logout()
}
AccountType.Microsoft -> {
scope.launch {
msGraphApiHelper.logout()
}
}
AccountType.Nextcloud -> {
scope.launch {
nextcloudApiHelper.logout()
@@ -80,7 +68,6 @@ internal class AccountsRepositoryImpl(
override fun isSupported(accountType: AccountType): Boolean {
return when (accountType) {
AccountType.Google -> googleApiHelper.isAvailable()
AccountType.Microsoft -> false
AccountType.Nextcloud -> true
AccountType.Owncloud -> true
}
@@ -91,9 +78,6 @@ internal class AccountsRepositoryImpl(
AccountType.Google -> {
getGoogleAccount()
}
AccountType.Microsoft -> {
getMicrosoftAccount()
}
AccountType.Nextcloud -> {
getNextcloudAccount()
}