diff options
author | Mark Wei <markwei@google.com> | 2014-03-02 16:52:56 -0800 |
---|---|---|
committer | Mark Wei <markwei@google.com> | 2014-03-02 16:52:56 -0800 |
commit | ad97cd0e0753930ec68f189e6be1023dc0f62f75 (patch) | |
tree | 3663c786f44546123f6321543170b5b37c41b4ea /src/com/android/bitmap/drawable | |
parent | 1a340d4fca7babcb67d6cfa754f58c1a756dfca0 (diff) | |
download | bitmap-ad97cd0e0753930ec68f189e6be1023dc0f62f75.tar.gz |
When detached from window, the last known RequestKey is saved inside of the BasicBitmapDrawable instead of referenced separately in the BitmapDrawableImageView. This fixes a bug where you could bind() a stale RequestKey to the drawable, after having called drawable.unbind() before it is attached back to the window.
Change-Id: Idba62fea647871d5c1c495b2c89e10779289a53b
Diffstat (limited to 'src/com/android/bitmap/drawable')
-rw-r--r-- | src/com/android/bitmap/drawable/BasicBitmapDrawable.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/bitmap/drawable/BasicBitmapDrawable.java b/src/com/android/bitmap/drawable/BasicBitmapDrawable.java index a09daad..831f410 100644 --- a/src/com/android/bitmap/drawable/BasicBitmapDrawable.java +++ b/src/com/android/bitmap/drawable/BasicBitmapDrawable.java @@ -109,6 +109,10 @@ public class BasicBitmapDrawable extends Drawable implements DecodeCallback, return mCurrKey; } + public final RequestKey getPreviousKey() { + return mPrevKey; + } + protected ReusableBitmap getBitmap() { return mBitmap; } |