Disable low memory shutdowns.

This commit is contained in:
akwizgran
2018-04-30 07:43:16 +01:00
parent 9be6d6c00f
commit 5d1a4acd15

View File

@@ -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(