Avoid changing internal state of shared drawable
An optimization in ImageView nulled out the internal bitmap of a cached internal BitmapDrawable object created to wrap a bitmap set on the ImageView. However, apps can get ahold of that cached object via Drawable.getBitmap(), resulting in having the state of that object they may be using changing out from under them. The change is to null out the cached object when getDrawable() is called, to avoid leaking internal state that we may change. That way, the app can continue to use that object if they want to, but we are no longer relying on it internally, and will create a new one when needed. Issue #22930646 [1P Regression from L] ImageView is blanked out in Activity in Google Express Change-Id: Ic86cb93be4897b6ba247c1fabcda507e4ba01300
Loading
Please register or sign in to comment