It wasn't fixed in 1.0r2. We cannot put fixes in the SDK if they are
not available on the phones. Also, the bug is internal, it's not on
the external tracker.

On Mon, Dec 15, 2008 at 11:30 PM, Cheryl Sedota <[email protected]> wrote:
>
> Romain,
>
> What is the bug number for this?  Was it fixed in the 1.0 r2 SDK?
>
> - Cheryl
>
> On Nov 12, 7:25 am, blindfold <[email protected]> wrote:
>> Interesting. In case this Android bug/feature not only applies to
>> input streams, this might also explain why I no longer had memory
>> related crashes on the G1 after recently switching to using
>> BitmapFactory.decodeResource(getResources() instead of getResources
>> ().getDrawable() to retrieve background images from my resources.
>>
>> Regards
>>
>> On Nov 12, 5:30 am, Romain Guy <[email protected]> wrote:
>>
>> > This is a known bug. Here is a workaround:
>>
>> >                     in = new BufferedInputStream(new
>> > URL(getUrl(size)).openStream(),
>> >                             IO_BUFFER_SIZE);
>>
>> >                     final ByteArrayOutputStream dataStream = new
>> > ByteArrayOutputStream();
>> >                     out = new BufferedOutputStream(dataStream, 
>> > IO_BUFFER_SIZE);
>> >                     copy(in, out);
>> >                     out.flush();
>>
>> >                     final byte[] data = dataStream.toByteArray();
>> >                     bitmap = BitmapFactory.decodeByteArray(data, 0,
>> > data.length);
>>
>>
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  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