For what you know, your thread / application can die at any time, at any time, the phone falls to the ground and the battery is turned off, and the last thing you know is the phone that it turned off in the fastest way.
The Android life cycle and its management are complex, and there is no real answer, because on Google, commenting on such things, they really like the word "automagic", so they certainly do not give out any internal details about this, at least not in " plain old English. "
There is the first Google IO about Android that talks about it, you can go back to YouTube and find Google life talk about the Android life cycle if you want more information about it.
In any case, Android does not give you absolutely nothing about how and for how long your application will work, and you have at least variables: what the OS does (Android) and what the user does, and these 2 things can even be mixed. when a user enters the life information of your application that Android should process.
source share