Use equals to compare animated frame cache keys
Summary: Cache keys should be compared using equals so that we can properly share frames between images.
@@ -52,8 +52,8 @@ public class AnimatedFrameCache {
}
if (o instanceof FrameKey) {
FrameKey that = (FrameKey) o;
- return this.mImageCacheKey == that.mImageCacheKey &&
- this.mFrameIndex == that.mFrameIndex;
+ return this.mFrameIndex == that.mFrameIndex
+ && this.mImageCacheKey.equals(that.mImageCacheKey);
}
return false;
}
