In android can you load resources outside the ui thread
<p>I have what is hopefully a simple question. I want to know if you can safely load resources from a non-ui thread. I'm talking about things in the "res" folder. I just can't find any documentation that definitively answers this question. There are a lot of mentions in the SDK related to what is not allowed on the UI Thread. I never saw anything that mentioned loading resources in this way.</p>

<p>For example can I call this code from a background thread?
    <code>Bitmap icon = BitmapFactory.decodeResource(context.getResources(), R.drawable.icon_resource);</code></p>

<p>Does it help if I remove the context.getResources() part and only do:
    <code>Bitmap icon = BitmapFactory.decodeResource(res, R.drawable.icon_resource);</code></p>
