Hi Mark,

thanks for your reply. Yes, it's probably managed by the system, yet
I'm still wondering:

Below you can see that the browser activity runs in different
processes (#2307, #5536) before and after I killed/restarted it, and
yet it's displaying / restoring the same UI input values entered by
the user, regardless of being in an entire new process.

So, are the two activities in these two processes actually the same
instance? If so, why?
(I was thinking of something like 'task parenting' to be eventually
happening here, but it cannot be, since there's no
android:allowTaskReparenting attribute in the application's manifest
and the default value for an activity for such is false. And it would
also mean that the activity wouldn't really be gone even after kill
has been executed.)


[*** some user input on UI in the browser app ***]

# ps | grep -i browser
ps | grep -i browser
app_27   2307  75    131944 25960 ffffffff afe0da04 S
com.android.browser
# killall -9 com.android.browser
killall -9 com.android.browser

[*** browser is killed, then I press home long, select browser app
from recent apps ***]

# ps | grep -i browser
ps | grep -i browser
app_27   5536  75    121868 24316 ffffffff afe0da04 S
com.android.browser

[*** ... and the UI still shows values from the activity in the
previous #2307 process *** ]




On Nov 8, 8:19 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> On Mon, Nov 8, 2010 at 1:37 AM, Mathias Lin <m...@mathiaslin.com> wrote:
> > That's what I thought. But why is the UI state then not entirely
> > cleared?
>
> AFAIK, applications do not hold the saved instance state -- the
> operating system does, in its own process.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to