JNI interfaces are now singletons

This commit is contained in:
Sebastian Stenzel
2019-09-18 23:40:53 +02:00
parent ba22f0ed3c
commit db836a9dc3
3 changed files with 6 additions and 9 deletions
@@ -11,17 +11,20 @@ import org.cryptomator.jni.JniFunctions;
import org.cryptomator.jni.MacFunctions;
import org.cryptomator.jni.WinFunctions;
import javax.inject.Singleton;
import java.util.Optional;
@Module
public class JniModule {
@Provides
@Singleton
Optional<MacFunctions> provideOptionalMacFunctions() {
return JniFunctions.macFunctions();
}
@Provides
@Singleton
Optional<WinFunctions> provideOptionalWinFunctions() {
return JniFunctions.winFunctions();
}