Refine trim memory level

This commit is contained in:
Mygod
2020-07-02 07:09:36 +08:00
parent d462b3ac07
commit 2d5c198abb

View File

@@ -96,7 +96,9 @@ class App : Application() {
override fun onTrimMemory(level: Int) {
super.onTrimMemory(level)
if (level >= TRIM_MEMORY_RUNNING_CRITICAL) GlobalScope.launch { RootManager.closeExisting() }
if (level == TRIM_MEMORY_RUNNING_CRITICAL || level >= TRIM_MEMORY_BACKGROUND) GlobalScope.launch {
RootManager.closeExisting()
}
}
/**