On Wed, Jan 26, 2011 at 5:34 PM, H <[email protected]> wrote:

> I suspect that the user has (e.g.) rotated the phone and at that split
> moment, the activity is being dropped and restarted by android. But things
> running in other threads may still linger and if they try to access app
> resources, the context may respond with "resource not found" while it is
> temporarily in a limbo state. I think there are other scenarios that could
> also cause this - maybe a user exiting an app while a thread is still
> running and again the resources are no longer retrievable but a running
> thread tries to access them before it is shut down by android.
>

That's not how things work.  There is only one Resources object created for
you for your .apk in your process.  When a configuration change happens, its
configuration is just updated.  When that happens, it just flushes out any
previously cached resources it had (holding an internal lock while doing
so), so the next request will re-load it with the new configuration.

Also, on the shipping platform fundamental resources like button images are
pre-loaded in zygote, so they never need to be loaded by apps.  It is very
odd that you would ever see in your app even an attempt to load the standard
button image.

-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

Reply via email to