Clear the UI in onLowMemory() if SDK_INT < 16.

This commit is contained in:
akwizgran
2018-05-04 12:18:52 +01:00
parent 6da45a4585
commit ed53544226

View File

@@ -217,6 +217,14 @@ public class BriarService extends Service {
}).start();
}
@Override
public void onLowMemory() {
super.onLowMemory();
LOG.warning("Memory is low");
// Clear the UI - this is done in onTrimMemory() if SDK_INT >= 16
if (SDK_INT < 16) hideUi();
}
@Override
public void onTrimMemory(int level) {
super.onTrimMemory(level);