Annotate methods that should be called with a wake lock.

This commit is contained in:
akwizgran
2020-08-10 17:23:45 +01:00
parent 3ecec61c25
commit 79f3a77e1a
12 changed files with 56 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ import org.briarproject.bramble.api.sync.Group;
import org.briarproject.bramble.api.sync.GroupId;
import org.briarproject.bramble.api.system.Clock;
import org.briarproject.bramble.api.system.TaskScheduler;
import org.briarproject.bramble.api.system.Wakeful;
import org.briarproject.bramble.util.StringUtils;
import org.briarproject.briar.api.blog.Blog;
import org.briarproject.briar.api.blog.BlogManager;
@@ -284,7 +285,7 @@ class FeedManagerImpl implements FeedManager, EventListener, OpenDatabaseHook,
}
/**
* This method is called periodically from a background service.
* This method is called periodically by the task scheduler.
* It fetches all available feeds and posts new entries to the respective
* blog.
* <p>
@@ -292,6 +293,7 @@ class FeedManagerImpl implements FeedManager, EventListener, OpenDatabaseHook,
* because fetching can take a long time
* and we can not block the database that long.
*/
@Wakeful
void fetchFeeds() {
if (!torActive) return;
LOG.info("Updating RSS feeds...");