Issue
I'm reading the documentation about Activity
lifecycle methods here
And here's a snapshot from the table in the documentation.
onStop()
method is marked as killable there. However, it's not clear when exactly Activity
is killable - after onStop()
of the base Activity
returns or of the derived one (the one extending the base Activity
) returns.
According to the quote below:
Note the "Killable" column in the above table -- for those methods that are marked as being killable, after that method returns the process hosting the activity may be killed by the system at any time without another line of its code being executed.
And to this one:
For those methods that are not marked as being killable, the activity's process will not be killed by the system starting from the time the method is called and continuing after it returns. Thus an activity is in the killable state, for example, between after onStop() to the start of onResume(). Keep in mind that under extreme memory pressure the system can kill the application process at any time.
It feels like the subclass's onStop
method is meant but still I have a doubt. Does anyone know which one is meant?
Please provide either a specific proof in the documentation or in the source code.
Solution
Another statement from docs:
Starting with Honeycomb, an application is not in the killable state until its onStop() has returned.
It's clear that a function returns when it reaches the end (after the base and subclasses' code have been executed).
Answered By - Derek K
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.