mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Make AuthorManager volatile as it is accessed from DbThread
This commit is contained in:
@@ -251,8 +251,10 @@ public class BriarService extends Service {
|
||||
Glide.get(getApplicationContext()).clearMemory();
|
||||
} else if (level == TRIM_MEMORY_RUNNING_LOW) {
|
||||
LOG.info("Trim memory: running low");
|
||||
// TODO investigate if we can clear Glide cache here as well
|
||||
} else if (level == TRIM_MEMORY_RUNNING_CRITICAL) {
|
||||
LOG.warning("Trim memory: running critically low");
|
||||
// TODO investigate if we can clear Glide cache here as well
|
||||
// If we're not in the foreground, clear the UI to save memory
|
||||
if (app.isRunningInBackground()) hideUi();
|
||||
} else if (LOG.isLoggable(INFO)) {
|
||||
|
||||
@@ -44,10 +44,12 @@ import static org.briarproject.bramble.util.LogUtils.logException;
|
||||
abstract class SharingStatusActivity extends BriarActivity
|
||||
implements EventListener {
|
||||
|
||||
// objects accessed from background thread need to be volatile
|
||||
@Inject
|
||||
AuthorManager authorManager;
|
||||
volatile AuthorManager authorManager;
|
||||
@Inject
|
||||
ConnectionRegistry connectionRegistry;
|
||||
volatile ConnectionRegistry connectionRegistry;
|
||||
|
||||
@Inject
|
||||
EventBus eventBus;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user