Does foreground always have priority?

Now I read the killer from memory (OOM), as well as how Android prioritizes processes ( https://developer.android.com/guide/components/processes-and-threads.html#Lifecycle )

It seems that in the foreground actions should always have the lowest oom_score and therefore should always be killed last. However, I came across situations where the launcher is actually less oom_score than in the foreground. Does anyone know why this behavior is so?

+4
source share
1 answer

Launcher will always have the lowest oom_score than the foreground, because the launcher should not ever close.

And the main reason for this is the launch of the program - the application / screen, which get start (using the ACTION_BOOT_COMPLETED intent) as the first screen after the device boots up, as well as its screen where you go when everything is closed.

0
source

Source: https://habr.com/ru/post/1651500/


All Articles