title: BitmapFactory.decodeResource returns a mutable Bitmap in Android 2.2 and an immutable Bitmap in Android 1.6
body: <p>I am developing an application and testing it on my device running Android 2.2.  In my code, I make use of a Bitmap that I retrieve using BitmapFactory.decodeResource, and I am able to make changes by calling <code>bitmap.setPixels()</code> on it.  When I test this on a friend's device running Android 1.6, I get an <code>IllegalStateException</code> in the call to <code>bitmap.setPixels</code>.  Documentation online says an <code>IllegalStateException</code> is thrown from this method when the bitmap is immutable.  The documentation doesn't say anything about <code>decodeResource</code> returning an immutable bitmap, but clearly that must be the case.</p>
  
  <p>Is there a different call I can make to get a mutable bitmap reliably from an application resource without needing a second <code>Bitmap</code> object (I could create a mutable one the same size and draw into a Canvas wrapping it, but that would require two bitmaps of equal size using up twice as much memory as I had intended)?</p>