Pressing "back" key when a killed process was on the stack
<p>I'm learning Android development and I'm a bit confused about how Android manages killing process when an activity is on the task's stack.
Let's say I have a task with 4 activities: A-B-C-D.</p>

<p>Let A,B,D be part of process P1 and C be part of process P2.</p>

<p>Let's suppose that while the user is interacting with D Android kills P2 since D needs a lot of memory. What happens when the user press the back key?</p>

<p>1) Since P2 has been killed and C is missing, B will be on the top (i.e. the stack becomes A-B).
2) A new process (let it be P3) is created and activity C is restarted (but of course its state will be the "starting" state)</p>
