OSDN Git Service

Do not deallocate on Bitmap.recycle
authorDiego Perez <diegoperez@google.com>
Mon, 14 Mar 2016 09:31:07 +0000 (09:31 +0000)
committerDiego Perez <diegoperez@google.com>
Mon, 14 Mar 2016 09:31:07 +0000 (09:31 +0000)
commitadf62b3ebc8ae5e3e76cf6cfce978e8d1ca5bf8e
treee9f87b901060e0248fd6bbe0a842d97c5eadd36c
parent497b473b8a6c898b3c05aeb8d3b80c611d7e78b0
Do not deallocate on Bitmap.recycle

Layoutlib only disposes the bitmap and doesn't recycle them. This causes
a double deallocation that triggers an assertion.
This change makes Bitmaps to be only freed when the finalizer is called.

Bug: http://b.android.com/203129
Change-Id: Ieabc1443544cfd2b4bf8ba9c8f9a4df8dd6e8220
tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java