mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +01:00
Disable low memory shutdowns.
This commit is contained in:
@@ -221,8 +221,6 @@ public class BriarService extends Service {
|
|||||||
public void onLowMemory() {
|
public void onLowMemory() {
|
||||||
super.onLowMemory();
|
super.onLowMemory();
|
||||||
LOG.warning("Memory is low");
|
LOG.warning("Memory is low");
|
||||||
shutdownFromBackground();
|
|
||||||
showLowMemoryShutdownNotification();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void shutdownFromBackground() {
|
private void shutdownFromBackground() {
|
||||||
@@ -247,6 +245,7 @@ public class BriarService extends Service {
|
|||||||
}).start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Remove if low memory shutdowns are not appropriate
|
||||||
private void showLowMemoryShutdownNotification() {
|
private void showLowMemoryShutdownNotification() {
|
||||||
androidExecutor.runOnUiThread(() -> {
|
androidExecutor.runOnUiThread(() -> {
|
||||||
NotificationCompat.Builder b = new NotificationCompat.Builder(
|
NotificationCompat.Builder b = new NotificationCompat.Builder(
|
||||||
|
|||||||
Reference in New Issue
Block a user