Update javadocs.

This commit is contained in:
akwizgran
2020-08-07 16:16:31 +01:00
parent d8be340120
commit 6e8e955dc2
2 changed files with 12 additions and 3 deletions

View File

@@ -7,9 +7,21 @@ import java.util.concurrent.Executor;
@NotNullByDefault
public interface AndroidWakeLockManager {
/**
* Creates a wake lock with the given tag. The tag is only used for
* logging; the underlying OS wake lock will use its own tag.
*/
AndroidWakeLock createWakeLock(String tag);
/**
* Runs the given task while holding a wake lock.
*/
void runWakefully(Runnable r, String tag);
/**
* Submits the given task to the given executor while holding a wake lock.
* The lock is released when the task completes, or if an exception is
* thrown while submitting or running the task.
*/
void executeWakefully(Runnable r, Executor executor, String tag);
}

View File

@@ -8,9 +8,6 @@ import java.util.concurrent.TimeUnit;
/**
* A service that can be used to schedule the execution of tasks.
* <p>
* The service should only be used for running tasks on other executors
* at scheduled times. No significant work should be run by the service itself.
*/
@NotNullByDefault
public interface TaskScheduler {