mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +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();
|
Glide.get(getApplicationContext()).clearMemory();
|
||||||
} else if (level == TRIM_MEMORY_RUNNING_LOW) {
|
} else if (level == TRIM_MEMORY_RUNNING_LOW) {
|
||||||
LOG.info("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) {
|
} else if (level == TRIM_MEMORY_RUNNING_CRITICAL) {
|
||||||
LOG.warning("Trim memory: running critically low");
|
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 we're not in the foreground, clear the UI to save memory
|
||||||
if (app.isRunningInBackground()) hideUi();
|
if (app.isRunningInBackground()) hideUi();
|
||||||
} else if (LOG.isLoggable(INFO)) {
|
} else if (LOG.isLoggable(INFO)) {
|
||||||
|
|||||||
@@ -44,10 +44,12 @@ import static org.briarproject.bramble.util.LogUtils.logException;
|
|||||||
abstract class SharingStatusActivity extends BriarActivity
|
abstract class SharingStatusActivity extends BriarActivity
|
||||||
implements EventListener {
|
implements EventListener {
|
||||||
|
|
||||||
|
// objects accessed from background thread need to be volatile
|
||||||
@Inject
|
@Inject
|
||||||
AuthorManager authorManager;
|
volatile AuthorManager authorManager;
|
||||||
@Inject
|
@Inject
|
||||||
ConnectionRegistry connectionRegistry;
|
volatile ConnectionRegistry connectionRegistry;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
EventBus eventBus;
|
EventBus eventBus;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user