mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Add wakeful IO executor.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package org.briarproject.bramble.system;
|
||||
|
||||
import org.briarproject.bramble.api.lifecycle.IoExecutor;
|
||||
import org.briarproject.bramble.api.system.WakefulIoExecutor;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
||||
/**
|
||||
* Provides a default implementation of {@link WakefulIoExecutor} for systems
|
||||
* without wake locks.
|
||||
*/
|
||||
@Module
|
||||
public class DefaultWakefulIoExecutorModule {
|
||||
|
||||
@Provides
|
||||
@WakefulIoExecutor
|
||||
Executor provideWakefulIoExecutor(@IoExecutor Executor ioExecutor) {
|
||||
return ioExecutor;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user