Fix build -.-
This commit is contained in:
parent
7704ab5b87
commit
2613ba5eae
@ -6,9 +6,16 @@ import android.content.Intent.ACTION_OPEN_DOCUMENT_TREE
|
||||
import android.provider.DocumentsContract
|
||||
import android.widget.Toast
|
||||
import com.dropbox.core.android.Auth
|
||||
import org.cryptomator.data.cloud.onedrive.OnedriveClientFactory
|
||||
import org.cryptomator.data.cloud.onedrive.graph.ClientException
|
||||
import org.cryptomator.data.cloud.onedrive.graph.ICallback
|
||||
import com.microsoft.identity.client.AuthenticationCallback
|
||||
import com.microsoft.identity.client.IAccount
|
||||
import com.microsoft.identity.client.IAuthenticationResult
|
||||
import com.microsoft.identity.client.IMultipleAccountPublicClientApplication
|
||||
import com.microsoft.identity.client.IPublicClientApplication
|
||||
import com.microsoft.identity.client.PublicClientApplication
|
||||
import com.microsoft.identity.client.exception.MsalClientException
|
||||
import com.microsoft.identity.client.exception.MsalException
|
||||
import com.microsoft.identity.client.exception.MsalServiceException
|
||||
import com.microsoft.identity.client.exception.MsalUiRequiredException
|
||||
import org.cryptomator.data.util.X509CertificateHelper
|
||||
import org.cryptomator.domain.Cloud
|
||||
import org.cryptomator.domain.CloudType
|
||||
@ -210,6 +217,19 @@ class AuthenticateCloudPresenter @Inject constructor( //
|
||||
}
|
||||
}
|
||||
|
||||
private inner class OnedriveAuthStrategy : AuthStrategy {
|
||||
|
||||
private var authenticationStarted = false
|
||||
override fun supports(cloud: CloudModel): Boolean {
|
||||
return cloud.cloudType() == CloudTypeModel.ONEDRIVE
|
||||
}
|
||||
|
||||
override fun resumed(intent: AuthenticateCloudIntent) {
|
||||
if (!authenticationStarted) {
|
||||
startAuthentication(intent.cloud())
|
||||
}
|
||||
}
|
||||
|
||||
private fun startAuthentication(cloud: CloudModel) {
|
||||
authenticationStarted = true
|
||||
|
||||
@ -315,7 +335,7 @@ class AuthenticateCloudPresenter @Inject constructor( //
|
||||
.build()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private inner class PCloudAuthStrategy : AuthStrategy {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user