Remove unused parameter

This commit is contained in:
Julian Raufelder 2022-03-15 16:30:49 +01:00
parent f38416070f
commit 8f2a94e98f
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D
2 changed files with 2 additions and 3 deletions

View File

@ -6,7 +6,6 @@ import com.microsoft.graph.httpcore.HttpClients
import com.microsoft.graph.requests.GraphServiceClient
import org.cryptomator.data.cloud.okhttplogging.HttpLoggingInterceptor
import org.cryptomator.data.util.NetworkTimeout
import org.cryptomator.util.SharedPreferencesHandler
import org.cryptomator.util.crypto.CredentialCryptor
import java.net.URL
import java.util.concurrent.CompletableFuture
@ -19,7 +18,7 @@ class OnedriveClientFactory private constructor() {
companion object {
fun createInstance(context: Context, encryptedToken: String, sharedPreferencesHandler: SharedPreferencesHandler): GraphServiceClient<Request> {
fun createInstance(context: Context, encryptedToken: String): GraphServiceClient<Request> {
val tokenAuthenticationProvider = object : BaseAuthenticationProvider() {
val token = CompletableFuture.completedFuture(CredentialCryptor.getInstance(context).decrypt(encryptedToken))
override fun getAuthorizationTokenAsync(requestUrl: URL): CompletableFuture<String> {

View File

@ -33,6 +33,6 @@ public class OnedriveCloudContentRepositoryFactory implements CloudContentReposi
@Override
public CloudContentRepository<OnedriveCloud, OnedriveNode, OnedriveFolder, OnedriveFile> cloudContentRepositoryFor(Cloud cloud) {
OnedriveCloud onedriveCloud = (OnedriveCloud) cloud;
return new OnedriveCloudContentRepository(onedriveCloud, context, OnedriveClientFactory.Companion.createInstance(context, onedriveCloud.accessToken(), sharedPreferencesHandler));
return new OnedriveCloudContentRepository(onedriveCloud, context, OnedriveClientFactory.Companion.createInstance(context, onedriveCloud.accessToken()));
}
}